New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

getjson

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

getjson

Request JSON data en masse with backoff and failover

pipPyPI
Version
2.0.0
Maintainers
1

getjson

A micro-package for retrieving JSON data, en masse potentially, with backoff and failover

Install

pip install getjson 

Usage

data_or_none = getjson.getjson('https://config.microprediction.com/config.json')

Usage w/ failover

data_or_none = getjson.getjson('https://config.microprediction.com/config.json','https://stableconfig.microprediction.com/config.json')

Multiple urls

urls = ['http://api.microprediction.org/lagged/traffic_absolute_speed.json','https://api.microprediction.org/lagged/die.json']
data = getjson.mgetjson(urls=urls)    

Multiple urls with failover

urls = ['http://api.microprediction.org/lagged/traffic_absolute_speed.json','https://api.microprediction.org/lagged/die.json']
failover_urls = ['http://stableapi.microprediction.org/lagged/traffic_absolute_speed.json','https://stableapi.microprediction.org/lagged/die.json']
data = getjson.mgetjson(urls=urls, failover_urls=failover_urls)    

Dude, what's microprediction?

New video tutorials are available at https://www.microprediction.com/python-1 to help you get started running crawlers at www.microprediction.com and win $50,000.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts