getjson


Namegetjson JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/microprediction/getjson
SummaryRequest JSON data en masse with backoff and failover
upload_time2022-04-06 13:24:20
maintainer
docs_urlNone
authormicroprediction
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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. 



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/microprediction/getjson",
    "name": "getjson",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "microprediction",
    "author_email": "info@microprediction.org",
    "download_url": "https://files.pythonhosted.org/packages/22/03/5edf11c4f30c84df84f5eb7f24fd921c47a1350338cc30ab048ea2e94c0f/getjson-2.0.0.tar.gz",
    "platform": null,
    "description": "# getjson\n\nA micro-package for retrieving JSON data, en masse potentially, with backoff and failover\n\n\n## Install \n\n    pip install getjson \n    \n## Usage \n\n    data_or_none = getjson.getjson('https://config.microprediction.com/config.json')\n\n## Usage w/ failover\n\n    data_or_none = getjson.getjson('https://config.microprediction.com/config.json','https://stableconfig.microprediction.com/config.json')\n\n## Multiple urls\n\n    urls = ['http://api.microprediction.org/lagged/traffic_absolute_speed.json','https://api.microprediction.org/lagged/die.json']\n    data = getjson.mgetjson(urls=urls)    \n\n## Multiple urls with failover\n\n    urls = ['http://api.microprediction.org/lagged/traffic_absolute_speed.json','https://api.microprediction.org/lagged/die.json']\n    failover_urls = ['http://stableapi.microprediction.org/lagged/traffic_absolute_speed.json','https://stableapi.microprediction.org/lagged/die.json']\n    data = getjson.mgetjson(urls=urls, failover_urls=failover_urls)    \n\n    \n### Dude, what's microprediction?\n\nNew video tutorials are available at https://www.microprediction.com/python-1 to help you\nget started running crawlers at www.microprediction.com and win $50,000. \n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Request JSON data en masse with backoff and failover",
    "version": "2.0.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "eafe2020733765e7b038691cb2cff259",
                "sha256": "c1de9e8dd0864c32fdf07c0b4a9c056f9506aaddb9d745a4f38079b9df1ec3b1"
            },
            "downloads": -1,
            "filename": "getjson-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eafe2020733765e7b038691cb2cff259",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 2598,
            "upload_time": "2022-04-06T13:24:19",
            "upload_time_iso_8601": "2022-04-06T13:24:19.648918Z",
            "url": "https://files.pythonhosted.org/packages/2b/9a/ca8085f270202ba165f7fcab8c1ce183aff1fff38ef023d17d17fd082bfa/getjson-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "c52adae4229fe888c709c7e90d506c49",
                "sha256": "3ed740717046da068a87cf383ee2bd5ace75d2a167a654651e2fa1a883d23cf8"
            },
            "downloads": -1,
            "filename": "getjson-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c52adae4229fe888c709c7e90d506c49",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2186,
            "upload_time": "2022-04-06T13:24:20",
            "upload_time_iso_8601": "2022-04-06T13:24:20.771128Z",
            "url": "https://files.pythonhosted.org/packages/22/03/5edf11c4f30c84df84f5eb7f24fd921c47a1350338cc30ab048ea2e94c0f/getjson-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-04-06 13:24:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "microprediction",
    "github_project": "getjson",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "getjson"
}
        
Elapsed time: 0.01584s