{ "info": { "author": "Simon Willison", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# paginate-json\n\n[![PyPI](https://img.shields.io/pypi/v/paginate-json.svg)](https://pypi.python.org/pypi/paginate-json)\n[![CircleCI](https://circleci.com/gh/simonw/paginate-json.svg?style=svg)](https://circleci.com/gh/simonw/paginate-json)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/paginate-json/blob/master/LICENSE)\n\nCLI tool for retrieving JSON from paginated APIs.\n\nCurrently works against APIs that use the HTTP Link header for pagination. The GitHub API is [the most obvious example](https://developer.github.com/v3/guides/traversing-with-pagination/).\n\n $ paginate-json --help\n Usage: paginate-json [OPTIONS] URL\n\n Fetch paginated JSON from a URL\n\n Options:\n --version Show the version and exit.\n --nl Output newline-delimited JSON\n --jq TEXT jq transformation to run on each page\n --help Show this message and exit.\n\nThe `--jq` option only works if you install the optional pyjq dependency.\n\nWorks well in conjunction with [sqlite-utils](https://github.com/simonw/sqlite-utils). For example, here's how to load all of the GitHub issues for a project into a local SQLite database.\n\n paginate-json \\\n \"https://api.github.com/repos/simonw/datasette/issues?state=all&filter=all\" \\\n --nl | \\\n sqlite-utils upsert /tmp/issues.db issues - --nl --pk=id\n\nYou can then use [other features of sqlite-utils](https://sqlite-utils.readthedocs.io/en/latest/cli.html) to enhance the resulting database. For example, to enable full-text search on the issue title and body columns:\n\n sqlite-utils enable-fts /tmp/issues.db issues title body\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/simonw/paginate-json", "keywords": "", "license": "Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "paginate-json", "package_url": "https://pypi.org/project/paginate-json/", "platform": "", "project_url": "https://pypi.org/project/paginate-json/", "project_urls": { "Homepage": "https://github.com/simonw/paginate-json" }, "release_url": "https://pypi.org/project/paginate-json/0.2/", "requires_dist": [ "requests", "click", "pyjq ; extra == 'pyjq'", "pytest ; extra == 'test'" ], "requires_python": "", "summary": "CLI tool for fetching paginated JSON from a URL", "version": "0.2" }, "last_serial": 5796714, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "1c28bb5e37937d3a3bfa7c91253b8ec2", "sha256": "e2b95204a72f1d0163d619f0faac9bdd1331deb7ebf76ae3523686fac2f3e354" }, "downloads": -1, "filename": "paginate_json-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1c28bb5e37937d3a3bfa7c91253b8ec2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7300, "upload_time": "2019-06-12T15:19:55", "url": "https://files.pythonhosted.org/packages/aa/bc/6dd23d1516023492ffdddc93ac1572bd791e66c12de15724434c912ec04f/paginate_json-0.1-py3-none-any.whl" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "3bcbfa98318e906b810c559b63f8cf87", "sha256": "52ed5365894fafa29e982bd5799d9333df29a64b7b6fa21fbe5e4fd8a6abb4c4" }, "downloads": -1, "filename": "paginate_json-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "3bcbfa98318e906b810c559b63f8cf87", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7374, "upload_time": "2019-09-07T16:59:12", "url": "https://files.pythonhosted.org/packages/93/e0/65fe87a4fbf1b5346de5fad7fe9beedbbba9e80aa3184849fd95c72f462e/paginate_json-0.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3bcbfa98318e906b810c559b63f8cf87", "sha256": "52ed5365894fafa29e982bd5799d9333df29a64b7b6fa21fbe5e4fd8a6abb4c4" }, "downloads": -1, "filename": "paginate_json-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "3bcbfa98318e906b810c559b63f8cf87", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7374, "upload_time": "2019-09-07T16:59:12", "url": "https://files.pythonhosted.org/packages/93/e0/65fe87a4fbf1b5346de5fad7fe9beedbbba9e80aa3184849fd95c72f462e/paginate_json-0.2-py3-none-any.whl" } ] }