{ "info": { "author": "bcj", "author_email": "brendan@bcjbcj.ca", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Customer Service", "Intended Audience :: Developers", "Intended Audience :: Other Audience", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Artistic Software", "Topic :: Games/Entertainment", "Topic :: Multimedia", "Topic :: Multimedia :: Sound/Audio", "Topic :: Multimedia :: Video", "Topic :: Utilities" ], "description": "# Archiveorg\n\nAn [Internet Archive](archive.org) search tool.\n\nThis project is not affiliated with the Internet Archive.\n\nThe Internet Archive is a non-profit project that provides a public service.\nIf you are using package (or the Internet Archive generally) on an ongoing basis, please consider [donating](https://archive.org/donate/) to them.\n\n# Installation\n\nArchiveorg requires Python 3.6+.\n\nTo install:\n\n```sh\npip install archiveorg\n```\n\n# Usage\n\nArchiveorg contains a single object, `Search`.\n\n```python\nfrom archiveorg import Search\n```\n\nPass in all search parameters when creating the search object.\nSee the Internet Archive's [search API](https://archive.org/help/aboutsearch.htm) for details on which parameters exist:\n\n```python\nsearch = Search(mediatype='image', collection='maps_usgs')\n```\n\nWhen the search is created, it will do an initial check of how many results exists:\n\n```python\n>>>search.num_items\n10000\n>>>search.num_pages\n10\n```\n\n**NOTE**: By default, the number of items per page is 1,000 (and can be specified using the `rows` parameter).\nAs per their API, a maximum of 10,000 items will be returned.\nYou can actually specify up to 100,000,000 rows (at which point results will not be paginated and won't be sorted in any way).\n\nOnce your search has been created, you can iterate over results:\n\n```python\nfor result in search:\n print(result['identifier'])\n```\n\nThe result will be a dictionary representing the `JSON` search output.\n\nYou can also user the explicit `iterate` method if you want to start from an offset, or if you want to limit results to items which have files of a certain format:\n\n```python\nfor result in search.iterate(offset=100, format_regex=r'^TIFF$'):\n ... # only results with .tiff files, starting from the 101st object.\n```\n\nYou can download files using the `get_files` method:\n\n```python\nfor result in search:\n directory = Path(result['identifier'])\n\n file_list = search.get_files(result, directory)\n```\n\nEach result may have multiple files.\nYou can use the `format_regex` parameter to filter files based on file format.\n\n## Random access\n\nYou can use the `random_item` method to return a single random result.\nYou can use the `format_regex` parameter to ensure the result contains the file type you want.\n\nThe method will return `None` if no result can be found.\nYou can use the `max_attempts` parameter to adjust the number of attempts are made to find a matching result.\n\n# License\n\nArchiveorg is available under an AGPL License.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bcj/archiveorg", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "archiveorg", "package_url": "https://pypi.org/project/archiveorg/", "platform": "", "project_url": "https://pypi.org/project/archiveorg/", "project_urls": { "Homepage": "https://github.com/bcj/archiveorg" }, "release_url": "https://pypi.org/project/archiveorg/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "An Internet Archive search tool.", "version": "0.2.0" }, "last_serial": 3126092, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c3dba1fe8bbd9f25d0059fd90525873c", "sha256": "36fae8872026f8e59b6718d95ac561b0bc5dc8009790f8cff59567f1dd8d1bf7" }, "downloads": -1, "filename": "archiveorg-0.1.0-py3.6.egg", "has_sig": false, "md5_digest": "c3dba1fe8bbd9f25d0059fd90525873c", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 8562, "upload_time": "2017-08-26T03:56:08", "url": "https://files.pythonhosted.org/packages/80/32/14d5bfc37475a0e0b32cb638d0d496bcea3e8d1f0e3ff2843b09082776de/archiveorg-0.1.0-py3.6.egg" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5866250887564553b1f77d9e5c5f7748", "sha256": "9f5b0ea581c5e47771f3e65b398d5f0b6fa80b81b764c8f31f5383f8eeb9325d" }, "downloads": -1, "filename": "archiveorg-0.2.0-py3.6.egg", "has_sig": false, "md5_digest": "5866250887564553b1f77d9e5c5f7748", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 9465, "upload_time": "2017-08-27T06:43:17", "url": "https://files.pythonhosted.org/packages/b2/7b/0e0a4d55d2b82e4940679a6638035750d534682141868f94f2016a51e99c/archiveorg-0.2.0-py3.6.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5866250887564553b1f77d9e5c5f7748", "sha256": "9f5b0ea581c5e47771f3e65b398d5f0b6fa80b81b764c8f31f5383f8eeb9325d" }, "downloads": -1, "filename": "archiveorg-0.2.0-py3.6.egg", "has_sig": false, "md5_digest": "5866250887564553b1f77d9e5c5f7748", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 9465, "upload_time": "2017-08-27T06:43:17", "url": "https://files.pythonhosted.org/packages/b2/7b/0e0a4d55d2b82e4940679a6638035750d534682141868f94f2016a51e99c/archiveorg-0.2.0-py3.6.egg" } ] }