Skip to main content

PyPI Simple Repository API client library

Project description

Project Status: Active — The project has reached a stable, usable state and is being actively developed. CI Status https://codecov.io/gh/jwodder/pypi-simple/branch/master/graph/badge.svg https://img.shields.io/pypi/pyversions/pypi-simple.svg MIT License

GitHub | PyPI | Documentation | Issues | Changelog

pypi-simple is a client library for the Python Simple Repository API as specified in PEP 503 and updated by PEP 592 and PEP 629. With it, you can query the Python Package Index (PyPI) and other pip-compatible repositories for a list of their available projects and lists of each project’s available package files. The library also allows you to query package files for their project version, package type, file digests, requires_python string, and PGP signature URL.

See the documentation for more information.

Installation

pypi-simple requires Python 3.6 or higher. Just use pip for Python 3 (You have pip, right?) to install pypi-simple and its dependencies:

python3 -m pip install pypi-simple

Example

>>> from pypi_simple import PyPISimple
>>> with PyPISimple() as client:
...     requests_page = client.get_project_page('requests')
>>> pkg = requests_page.packages[0]
>>> pkg
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=None, yanked=None)
>>> pkg.filename
'requests-0.2.0.tar.gz'
>>> pkg.url
'https://files.pythonhosted.org/packages/ba/bb/dfa0141a32d773c47e4dede1a617c59a23b74dd302e449cf85413fc96bc4/requests-0.2.0.tar.gz#sha256=813202ace4d9301a3c00740c700e012fb9f3f8c73ddcfe02ab558a8df6f175fd'
>>> pkg.project
'requests'
>>> pkg.version
'0.2.0'
>>> pkg.package_type
'sdist'
>>> pkg.get_digests()
{'sha256': '813202ace4d9301a3c00740c700e012fb9f3f8c73ddcfe02ab558a8df6f175fd'}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypi-simple-0.8.0.tar.gz (40.3 kB view details)

Uploaded Source

Built Distribution

pypi_simple-0.8.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file pypi-simple-0.8.0.tar.gz.

File metadata

  • Download URL: pypi-simple-0.8.0.tar.gz
  • Upload date:
  • Size: 40.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.5

File hashes

Hashes for pypi-simple-0.8.0.tar.gz
Algorithm Hash digest
SHA256 339710d48b5e309f2c4959a5f9549daf762f45c285bbdacbdc2dab2c46768e7b
MD5 46dcc85d586271f0fcbdca9cf95d2b89
BLAKE2b-256 89343aee58052386f81d5753db0e370573f25a4c079e4c695770d2677754ea5a

See more details on using hashes here.

File details

Details for the file pypi_simple-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: pypi_simple-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.5

File hashes

Hashes for pypi_simple-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6a0b7b565f0790ca44e75e5ffa45ca064ed3c9010a48eb0b0b32a9cfd93ea0e
MD5 6939a1c78b4e7f428e748e44eade7d5a
BLAKE2b-256 3cd2e6c9a0fdcfd2b068e40866cb65338656c019651f43bcbce302db9378edf2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page