Skip to main content

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.

Metadata

Release files for getjson 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for getjson 2.0.0
File Size Uploaded
getjson-2.0.0.tar.gz 2.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for getjson 2.0.0
File Interpreter ABI Platform
getjson-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.8 kB

Release files / getjson-2.0.0.tar.gz

Download URL getjson-2.0.0.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3ed740717046da068a87cf383ee2bd5ace75d2a167a654651e2fa1a883d23cf8
BLAKE2b-256 checksum
How to use checksums
22035edf11c4f30c84df84f5eb7f24fd921c47a1350338cc30ab048ea2e94c0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / getjson-2.0.0-py3-none-any.whl

Download URL getjson-2.0.0-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1de9e8dd0864c32fdf07c0b4a9c056f9506aaddb9d745a4f38079b9df1ec3b1
BLAKE2b-256 checksum
How to use checksums
2b9aca8085f270202ba165f7fcab8c1ce183aff1fff38ef023d17d17fd082bfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.0.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page