{ "info": { "author": "John Thorvald Wodder II", "author_email": "pypi-simple@varonathe.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Software Distribution", "Topic :: Text Processing :: Markup :: HTML" ], "description": ".. image:: http://www.repostatus.org/badges/latest/active.svg\n :target: http://www.repostatus.org/#active\n :alt: Project Status: Active \u2014 The project has reached a stable, usable\n state and is being actively developed.\n\n.. image:: https://travis-ci.org/jwodder/pypi-simple.svg?branch=master\n :target: https://travis-ci.org/jwodder/pypi-simple\n\n.. image:: https://codecov.io/gh/jwodder/pypi-simple/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/jwodder/pypi-simple\n\n.. image:: https://img.shields.io/pypi/pyversions/pypi-simple.svg\n :target: https://pypi.org/project/pypi-simple/\n\n.. image:: https://img.shields.io/github/license/jwodder/pypi-simple.svg\n :target: https://opensource.org/licenses/MIT\n :alt: MIT License\n\n.. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg\n :target: https://saythanks.io/to/jwodder\n\n`GitHub `_\n| `PyPI `_\n| `Issues `_\n| `Changelog `_\n\n``pypi-simple`` is a client library for the Python Simple Repository API as\nspecified in `PEP 503 `_ and updated\nby `PEP 592 `_. With it, you can\nquery `the Python Package Index (PyPI) `_ and other `pip\n`_-compatible repositories for a list of their available\nprojects and lists of each project's available package files. The library also\nallows you to query package files for their project version, package type, file\ndigests, ``requires_python`` string, and PGP signature URL.\n\n\nInstallation\n============\nJust use `pip `_ (You have pip, right?) to install\n``pypi-simple`` and its dependencies::\n\n pip install pypi-simple\n\n\nExample\n=======\n\n::\n\n >>> from pypi_simple import PyPISimple\n >>> client = PyPISimple()\n >>> packages = client.get_project_files('requests')\n >>> packages[0]\n DistributionPackage(filename='requests-0.2.0.tar.gz', url='https://files.pythonhosted.org/packages/ba/bb/dfa0141a32d773c47e4dede1a617c59a23b74dd302e449cf85413fc96bc4/requests-0.2.0.tar.gz#sha256=813202ace4d9301a3c00740c700e012fb9f3f8c73ddcfe02ab558a8df6f175fd', project='requests', version='0.2.0', package_type='sdist', requires_python=None, has_sig=False, yanked=None)\n >>> packages[0].filename\n 'requests-0.2.0.tar.gz'\n >>> packages[0].url\n 'https://files.pythonhosted.org/packages/ba/bb/dfa0141a32d773c47e4dede1a617c59a23b74dd302e449cf85413fc96bc4/requests-0.2.0.tar.gz#sha256=813202ace4d9301a3c00740c700e012fb9f3f8c73ddcfe02ab558a8df6f175fd'\n >>> packages[0].project\n 'requests'\n >>> packages[0].version\n '0.2.0'\n >>> packages[0].package_type\n 'sdist'\n >>> packages[0].get_digests()\n {'sha256': '813202ace4d9301a3c00740c700e012fb9f3f8c73ddcfe02ab558a8df6f175fd'}\n\n\nAPI\n===\n\n``PyPISimple``\n--------------\n\nA client for fetching package information from a Python simple package\nrepository\n\n``PyPISimple(endpoint=pypi_simple.PYPI_SIMPLE_ENDPOINT, auth=None, session=None)``\n Create a new ``PyPISimple`` object for querying the simple API instance at\n ``endpoint``. The endpoint defaults to PyPI's simple API at\n .\n\n If necessary, login/authentication details for the repository can be\n specified by setting the ``auth`` parameter to either a ``(username,\n password)`` pair or `another authentication object accepted by requests\n `_.\n\n If more complicated session configuration is desired (e.g., setting up\n caching), the user must create & configure a ``requests.Session`` object\n appropriately and pass it to the constructor as the ``session`` parameter.\n\n``client.get_projects()``\n Returns a generator of names of projects available in the repository.\n The names are not normalized.\n\n .. warning::\n\n PyPI's project index file is very large and takes several seconds\n to parse. Use this method sparingly.\n\n``client.get_project_files(project)``\n Returns a list of ``DistributionPackage`` objects representing all of the\n package files available in the repository for the given project.\n\n When fetching the project's information from the repository, a 404\n response is treated the same as an empty page, resulting in an empty\n list. All other HTTP errors cause a ``requests.HTTPError`` to be raised.\n\n``client.get_project_url(project)``\n Returns the URL for the given project's page in the repository.\n\n\n``DistributionPackage``\n-----------------------\n\nInformation about a versioned archived file from which a Python project release\ncan be installed. ``DistributionPackage`` objects have the following\nattributes and method:\n\n``filename``\n The basename of the package file\n\n``url``\n The URL from which the package file can be downloaded\n\n``project``\n The name of the project (as extracted from the filename), or `None` if the\n filename cannot be parsed\n\n``version``\n The project version (as extracted from the filename), or `None` if the\n filename cannot be parsed\n\n``package_type``\n The type of the package, or `None` if the filename cannot be parsed. The\n recognized package types are:\n\n - ``'dumb'``\n - ``'egg'``\n - ``'msi'``\n - ``'rpm'``\n - ``'sdist'``\n - ``'wheel'``\n - ``'wininst'``\n\n``requires_python``\n An optional version specifier string declaring the Python version(s) in\n which the package can be installed\n\n``has_sig``\n Whether the package file is accompanied by a PGP signature file\n\n``sig_url``\n If ``has_sig`` is true, this equals the URL of the package file's PGP\n signature file; otherwise, it equals `None`.\n\n``yanked``\n If the package file has been \"yanked\" from the package repository (meaning\n that it should only be installed when that specific version is requested),\n this attribute will be a string giving the reason why it was yanked;\n otherwise, it is `None`.\n\n``get_digests()``\n Extracts the hash digests from the package file's URL and returns a `dict`\n mapping hash algorithm names to hex-encoded digest strings\n\n\nUtility Functions\n-----------------\n\n``parse_simple_index(html, base_url=None, from_encoding=None)``\n Parse a simple repository's index page and return a generator of ``(project\n name, project URL)`` pairs. ``html`` is a `str` or `bytes` value to parse.\n ``base_url`` is an optional URL (usually the URL of the page being parsed)\n to join to the front of the URLs returned. ``from_encoding`` is an optional\n hint to Beautiful Soup as to the encoding of ``html``.\n\n``parse_project_page(html, base_url=None, from_encoding=None, project_hint=None)``\n Parse a project page from a simple repository and return a list of\n ``DistributionPackage`` objects. ``html`` is a `str` or `bytes` value to\n parse. ``base_url`` is an optional URL (usually the URL of the page being\n parsed) to join to the front of the URLs returned. ``from_encoding`` is an\n optional hint to Beautiful Soup as to the encoding of ``html``.\n ``project_hint`` is the name of the project whose page is being parsed; it\n is used to disambiguate the parsing of certain filenames.\n\n``parse_links(html, base_url=None, from_encoding=None)``\n Parse an HTML page and return a generator of links, where each link is\n represented as a triple of link text, link URL, and a `dict` of link tag\n attributes (including the unmodified ``href`` attribute). Link text has all\n leading & trailing whitespace removed. Keys in the attributes `dict` are\n converted to lowercase.\n\n ``html`` is a `str` or `bytes` value to parse. ``base_url`` is an optional\n URL (usually the URL of the page being parsed) to join to the front of the\n URLs returned. ``from_encoding`` is an optional hint to Beautiful Soup as\n to the encoding of ``html``.\n\n``parse_filename(filename, project_hint=None)``\n Given the filename of a distribution package, returns a triple of the\n project name, project version, and package type. The name and version are\n spelled the same as they appear in the filename; no normalization is\n performed.\n\n The package type may be any of the following strings:\n\n - ``'dumb'``\n - ``'egg'``\n - ``'msi'``\n - ``'rpm'``\n - ``'sdist'``\n - ``'wheel'``\n - ``'wininst'``\n\n If the filename cannot be parsed, ``(None, None, None)`` is returned.\n\n Note that some filenames (e.g., ``1-2-3.tar.gz``) may be ambiguous as\n to which part is the project name and which is the version. In order to\n resolve the ambiguity, the expected value for the project name (*modulo*\n normalization) can be supplied as the ``project_name`` argument to the\n function. If the filename can be parsed with the given string in the role\n of the project name, the results of that parse will be returned; otherwise,\n the function will fall back to breaking the project & version apart at an\n unspecified point.\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jwodder/pypi-simple", "keywords": "pypi,pep503,pep592,simple repository api,packages,pip", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pypi-simple", "package_url": "https://pypi.org/project/pypi-simple/", "platform": "", "project_url": "https://pypi.org/project/pypi-simple/", "project_urls": { "Bug Tracker": "https://github.com/jwodder/pypi-simple/issues", "Homepage": "https://github.com/jwodder/pypi-simple", "Say Thanks!": "https://saythanks.io/to/jwodder", "Source Code": "https://github.com/jwodder/pypi-simple" }, "release_url": "https://pypi.org/project/pypi-simple/0.5.0/", "requires_dist": [ "beautifulsoup4 (~=4.5)", "packaging (>=16)", "requests (~=2.5)", "six (~=1.4)" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "summary": "PyPI Simple Repository API client library", "version": "0.5.0" }, "last_serial": 5259308, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "673fd7ef692cc4ccadb0ecbec6bf29a7", "sha256": "b3bb61f80e54ae3e4c5011c5fd17fd26519a7499d6f4220bf125c7efa08dfb1f" }, "downloads": -1, "filename": "pypi_simple-0.1.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "673fd7ef692cc4ccadb0ecbec6bf29a7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 7497, "upload_time": "2018-08-31T19:25:12", "url": "https://files.pythonhosted.org/packages/6e/2a/ede61f8cd2ac2c329f8b8a55a211b2df442088dcd1c271f5d5d4c8f1d412/pypi_simple-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1bd9ee95a93145f65dd4f307a2c8d263", "sha256": "9076a513ba9ea8cf38e65df9553e5e51454f2dd4908a5075b7162e6fe286d18d" }, "downloads": -1, "filename": "pypi-simple-0.1.0.tar.gz", "has_sig": true, "md5_digest": "1bd9ee95a93145f65dd4f307a2c8d263", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 16830, "upload_time": "2018-08-31T19:25:14", "url": "https://files.pythonhosted.org/packages/b6/b6/522cccca8716f31600ec5dc043f6bdeeb5bb3252aef2f3211c2c6ad3fdb0/pypi-simple-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "77c4762044b7ad3e58c37134e29dac54", "sha256": "d44f4e17dd90303251b467872c7803c02ce7afdb5ad07d03d3fd81582fa37f8e" }, "downloads": -1, "filename": "pypi_simple-0.2.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "77c4762044b7ad3e58c37134e29dac54", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 7611, "upload_time": "2018-09-01T16:34:23", "url": "https://files.pythonhosted.org/packages/fb/2d/bd8b3affea9c83a57595fe2a79ea5411b0fb7c1b48e23ce3be4bfcca90d4/pypi_simple-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4b77bfbed1d481180329d5536e9d838", "sha256": "3523a8492fc4e1581184cf5ef946d49c8375c842890b9bdb832092d3fa83dd4f" }, "downloads": -1, "filename": "pypi-simple-0.2.0.tar.gz", "has_sig": true, "md5_digest": "c4b77bfbed1d481180329d5536e9d838", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 17903, "upload_time": "2018-09-01T16:34:25", "url": "https://files.pythonhosted.org/packages/c9/d1/1f02628f93a43d07b0a026a0e0661f368854fe4bd188d24dbdce5154a3e4/pypi-simple-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "f11fb74d04b953602c9e95d7da20b63b", "sha256": "f2237e3b89850510b8655139810ce4558a48c47b6f3a28015ad53fc8c576f971" }, "downloads": -1, "filename": "pypi_simple-0.3.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "f11fb74d04b953602c9e95d7da20b63b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 8342, "upload_time": "2018-09-03T15:05:20", "url": "https://files.pythonhosted.org/packages/32/ea/6e96b70108571ad0e05b7f9b019dc0f89a91b0b3e3d33aee87bedcc3c0ea/pypi_simple-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c6b809de049414a3b29c4df95059117b", "sha256": "bf309eea25099107445a226dfe84406f2fcd09b7b6709e426231d0e30d09d1a4" }, "downloads": -1, "filename": "pypi-simple-0.3.0.tar.gz", "has_sig": true, "md5_digest": "c6b809de049414a3b29c4df95059117b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 21803, "upload_time": "2018-09-03T15:05:21", "url": "https://files.pythonhosted.org/packages/e9/72/edaf1e459e138bc5dd2ed66b78209df0e804254e812dd25049bf056248be/pypi-simple-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "d7d6b21b59e94ee32c563b41c7ece976", "sha256": "bb2f967c8f05a6ca2522084b51ed5db5e576be3134fea79b7ccd34b64232f147" }, "downloads": -1, "filename": "pypi_simple-0.4.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "d7d6b21b59e94ee32c563b41c7ece976", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 9489, "upload_time": "2018-09-06T18:55:17", "url": "https://files.pythonhosted.org/packages/1e/5c/b7ada9798fd1c95384d3ed7bb20e6900502dcd59bb4d343e8dad44f24eab/pypi_simple-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f40258b351351067348478a91237e6e", "sha256": "826b734d941b7eeb231a2fe79ed86ab3087b5526fedfd4d906015fd973c163bf" }, "downloads": -1, "filename": "pypi-simple-0.4.0.tar.gz", "has_sig": true, "md5_digest": "0f40258b351351067348478a91237e6e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 23786, "upload_time": "2018-09-06T18:55:19", "url": "https://files.pythonhosted.org/packages/86/ab/3eb98a0d4d6da6cb4003d50e697e1a9fe92d0d99308131359a3818ca11cc/pypi-simple-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "d69826f87738ddc6d8ceab802700c80e", "sha256": "b4b68df0bce0b9fea2d139846a154e239804f0c9a42124703ed1ca354c77f1e3" }, "downloads": -1, "filename": "pypi_simple-0.5.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "d69826f87738ddc6d8ceab802700c80e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 10192, "upload_time": "2019-05-12T16:23:20", "url": "https://files.pythonhosted.org/packages/d0/39/f8711fb73ba38b4bab21706f30ca6f1af460c01ea1ef1eb77973aef3684a/pypi_simple-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8bd28d2151ba0f067989c036727f4e9e", "sha256": "a31d609bd435c7240851395e22db4c1cd9ff4a8a55aa9914e925edd632ae0127" }, "downloads": -1, "filename": "pypi-simple-0.5.0.tar.gz", "has_sig": true, "md5_digest": "8bd28d2151ba0f067989c036727f4e9e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 25652, "upload_time": "2019-05-12T16:23:22", "url": "https://files.pythonhosted.org/packages/d7/cb/a7abcdba8bf55ce665dd4cc659fccf28e58b6b727805eb6dd16f774fbe5d/pypi-simple-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d69826f87738ddc6d8ceab802700c80e", "sha256": "b4b68df0bce0b9fea2d139846a154e239804f0c9a42124703ed1ca354c77f1e3" }, "downloads": -1, "filename": "pypi_simple-0.5.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "d69826f87738ddc6d8ceab802700c80e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 10192, "upload_time": "2019-05-12T16:23:20", "url": "https://files.pythonhosted.org/packages/d0/39/f8711fb73ba38b4bab21706f30ca6f1af460c01ea1ef1eb77973aef3684a/pypi_simple-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8bd28d2151ba0f067989c036727f4e9e", "sha256": "a31d609bd435c7240851395e22db4c1cd9ff4a8a55aa9914e925edd632ae0127" }, "downloads": -1, "filename": "pypi-simple-0.5.0.tar.gz", "has_sig": true, "md5_digest": "8bd28d2151ba0f067989c036727f4e9e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 25652, "upload_time": "2019-05-12T16:23:22", "url": "https://files.pythonhosted.org/packages/d7/cb/a7abcdba8bf55ce665dd4cc659fccf28e58b6b727805eb6dd16f774fbe5d/pypi-simple-0.5.0.tar.gz" } ] }