Skip to main content

An API wrapper for the Python Package Index

Project description

pypiwrap

PyPI - Downloads per week PyPI - Latest Release PyPI - Supported Python Versions GitHub - License

Documentation · PyPI · Changelog

pypiwrap is an API wrapper for the Python Package Index (PyPI) providing interfaces for retrieving project information, releases and statistics from the PyPI JSON API, the Statistics API, and the Index API. pypiwrap also parses information from the PyPI RSS feeds.

Installation

pypiwrap requires Python 3.10 or later and can be installed with pip:

  • python3 -m pip install pypiwrap (Linux/Mac)
  • py -3 -m pip install pypiwrap (Windows)

Examples

import pypiwrap

# Fetching data from the PyPI API
with pypiwrap.PyPIClient() as pypi:
    project = pypi.get_project("requests")

    print(project.name)  # requests
    print(project.author)  # Kenneth Reitz
    print(project.summary)  # Python HTTP for Humans.

    stats = pypi.get_stats()
    print(stats.total_size.si)  # 24.61 TB


# Fetching data from the Index API
with pypiwrap.SimpleRepoClient() as repo:
    page = repo.get_project_page("requests")
    
    print(page.files[-1].url)  # https://files.pythonhosted.org/packages/63/70/[...]
    print(page.files[-1].size.si)  # 131.22 KB


# Fetching data from the RSS feeds
with pypiwrap.PyPIFeedClient() as rss:
    feed = rss.get_newest_packages()

    print(feed.title)  # PyPI newest packages

    for item in feed.items:
        print(item.title)  # ... added to PyPI

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

pypiwrap-2.1.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypiwrap-2.1.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file pypiwrap-2.1.0.tar.gz.

File metadata

  • Download URL: pypiwrap-2.1.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pypiwrap-2.1.0.tar.gz
Algorithm Hash digest
SHA256 b05957a4b6dc45b6ed8a3b822444ec839019982d255c5c271d9c4610788928ea
MD5 4368d55520f2ca2e8e901d7435d817d8
BLAKE2b-256 d4821c6f738270ca1435143cc9b4ab3beee38d79141abc135fb5c64f33cfe41a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypiwrap-2.1.0.tar.gz:

Publisher: python-publish.yml on aescarias/pypiwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pypiwrap-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: pypiwrap-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pypiwrap-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5e09e6e9db12b1b1a10b435ef9a235e39ff37635b4274f98cff4da0116ba87a
MD5 cdf6ae0a50ab976abf2dfb8bf1cd9c0c
BLAKE2b-256 e0f1d83e12fae5cecac4270c3fcdb86b9ca695050c88965d1b6d6fc5f3665914

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypiwrap-2.1.0-py3-none-any.whl:

Publisher: python-publish.yml on aescarias/pypiwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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