pypi-simple


Namepypi-simple JSON
Version 1.5.0 PyPI version JSON
download
home_page
SummaryPyPI Simple Repository API client library
upload_time2024-02-24 21:08:21
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords packages pep503 pip pypi simple repository api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://www.repostatus.org/badges/latest/active.svg
    :target: https://www.repostatus.org/#active
    :alt: Project Status: Active — The project has reached a stable, usable
          state and is being actively developed.

.. image:: https://github.com/jwodder/pypi-simple/actions/workflows/test.yml/badge.svg
    :target: https://github.com/jwodder/pypi-simple/actions/workflows/test.yml
    :alt: CI Status

.. image:: https://codecov.io/gh/jwodder/pypi-simple/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/jwodder/pypi-simple

.. image:: https://img.shields.io/pypi/pyversions/pypi-simple.svg
    :target: https://pypi.org/project/pypi-simple/

.. image:: https://img.shields.io/github/license/jwodder/pypi-simple.svg
    :target: https://opensource.org/licenses/MIT
    :alt: MIT License

`GitHub <https://github.com/jwodder/pypi-simple>`_
| `PyPI <https://pypi.org/project/pypi-simple/>`_
| `Documentation <https://pypi-simple.readthedocs.io>`_
| `Issues <https://github.com/jwodder/pypi-simple/issues>`_
| `Changelog <https://github.com/jwodder/pypi-simple/blob/master/CHANGELOG.md>`_

``pypi-simple`` is a client library for the Python Simple Repository API as
specified in :pep:`503` and updated by :pep:`592`, :pep:`629`, :pep:`658`,
:pep:`691`, :pep:`700`, :pep:`708`, and :pep:`714`.  With it, you can query
`the Python Package Index (PyPI) <https://pypi.org>`_ and other `pip
<https://pip.pypa.io>`_-compatible repositories for a list of their available
projects and lists of each project's available package files.  The library also
allows you to download package files and query them for their project version,
package type, file digests, ``requires_python`` string, PGP signature URL, and
metadata URL.

See `the documentation <https://pypi-simple.readthedocs.io>`_ for more
information.


Installation
============
``pypi-simple`` requires Python 3.7 or higher.  Just use `pip
<https://pip.pypa.io>`_ for Python 3 (You have pip, right?) to install it::

    python3 -m pip install pypi-simple

``pypi-simple`` can optionally make use of tqdm_.  To install it alongside
``pypi-simple``, specify the ``tqdm`` extra::

    python3 -m pip install "pypi-simple[tqdm]"

.. _tqdm: https://tqdm.github.io


Example
=======

Get information about a package:

>>> from pypi_simple import PyPISimple
>>> with PyPISimple() as client:
...     requests_page = client.get_project_page('requests')
>>> pkg = requests_page.packages[0]
>>> pkg.filename
'requests-0.2.0.tar.gz'
>>> pkg.url
'https://files.pythonhosted.org/packages/ba/bb/dfa0141a32d773c47e4dede1a617c59a23b74dd302e449cf85413fc96bc4/requests-0.2.0.tar.gz'
>>> pkg.project
'requests'
>>> pkg.version
'0.2.0'
>>> pkg.package_type
'sdist'
>>> pkg.digests
{'sha256': '813202ace4d9301a3c00740c700e012fb9f3f8c73ddcfe02ab558a8df6f175fd'}

Download a package with a tqdm progress bar:

.. code:: python

    from pypi_simple import PyPISimple, tqdm_progress_factory

    with PyPISimple() as client:
        page = client.get_project_page("pypi-simple")
        pkg = page.packages[-1]
        client.download_package(
            pkg, path=pkg.filename, progress=tqdm_progress_factory(),
        )

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pypi-simple",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "packages,pep503,pip,pypi,simple repository api",
    "author": "",
    "author_email": "John Thorvald Wodder II <pypi-simple@varonathe.org>",
    "download_url": "https://files.pythonhosted.org/packages/24/96/dc3f15678253d1d5e708d515eb93689d73975bfb6161245c02b103095d11/pypi_simple-1.5.0.tar.gz",
    "platform": null,
    "description": ".. image:: https://www.repostatus.org/badges/latest/active.svg\n    :target: https://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://github.com/jwodder/pypi-simple/actions/workflows/test.yml/badge.svg\n    :target: https://github.com/jwodder/pypi-simple/actions/workflows/test.yml\n    :alt: CI Status\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`GitHub <https://github.com/jwodder/pypi-simple>`_\n| `PyPI <https://pypi.org/project/pypi-simple/>`_\n| `Documentation <https://pypi-simple.readthedocs.io>`_\n| `Issues <https://github.com/jwodder/pypi-simple/issues>`_\n| `Changelog <https://github.com/jwodder/pypi-simple/blob/master/CHANGELOG.md>`_\n\n``pypi-simple`` is a client library for the Python Simple Repository API as\nspecified in :pep:`503` and updated by :pep:`592`, :pep:`629`, :pep:`658`,\n:pep:`691`, :pep:`700`, :pep:`708`, and :pep:`714`.  With it, you can query\n`the Python Package Index (PyPI) <https://pypi.org>`_ and other `pip\n<https://pip.pypa.io>`_-compatible repositories for a list of their available\nprojects and lists of each project's available package files.  The library also\nallows you to download package files and query them for their project version,\npackage type, file digests, ``requires_python`` string, PGP signature URL, and\nmetadata URL.\n\nSee `the documentation <https://pypi-simple.readthedocs.io>`_ for more\ninformation.\n\n\nInstallation\n============\n``pypi-simple`` requires Python 3.7 or higher.  Just use `pip\n<https://pip.pypa.io>`_ for Python 3 (You have pip, right?) to install it::\n\n    python3 -m pip install pypi-simple\n\n``pypi-simple`` can optionally make use of tqdm_.  To install it alongside\n``pypi-simple``, specify the ``tqdm`` extra::\n\n    python3 -m pip install \"pypi-simple[tqdm]\"\n\n.. _tqdm: https://tqdm.github.io\n\n\nExample\n=======\n\nGet information about a package:\n\n>>> from pypi_simple import PyPISimple\n>>> with PyPISimple() as client:\n...     requests_page = client.get_project_page('requests')\n>>> pkg = requests_page.packages[0]\n>>> pkg.filename\n'requests-0.2.0.tar.gz'\n>>> pkg.url\n'https://files.pythonhosted.org/packages/ba/bb/dfa0141a32d773c47e4dede1a617c59a23b74dd302e449cf85413fc96bc4/requests-0.2.0.tar.gz'\n>>> pkg.project\n'requests'\n>>> pkg.version\n'0.2.0'\n>>> pkg.package_type\n'sdist'\n>>> pkg.digests\n{'sha256': '813202ace4d9301a3c00740c700e012fb9f3f8c73ddcfe02ab558a8df6f175fd'}\n\nDownload a package with a tqdm progress bar:\n\n.. code:: python\n\n    from pypi_simple import PyPISimple, tqdm_progress_factory\n\n    with PyPISimple() as client:\n        page = client.get_project_page(\"pypi-simple\")\n        pkg = page.packages[-1]\n        client.download_package(\n            pkg, path=pkg.filename, progress=tqdm_progress_factory(),\n        )\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "PyPI Simple Repository API client library",
    "version": "1.5.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/jwodder/pypi-simple/issues",
        "Source Code": "https://github.com/jwodder/pypi-simple"
    },
    "split_keywords": [
        "packages",
        "pep503",
        "pip",
        "pypi",
        "simple repository api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "067000764414c674aee670d95058822419018092d11325f0b2404c14dbb2f2b6",
                "md5": "5ecc379993d30c1c15609a61feb2d412",
                "sha256": "688145f499043701518e2f3a1102b8314c88e9323b5140d45e7fe5a9f4cb3527"
            },
            "downloads": -1,
            "filename": "pypi_simple-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ecc379993d30c1c15609a61feb2d412",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 24922,
            "upload_time": "2024-02-24T21:08:19",
            "upload_time_iso_8601": "2024-02-24T21:08:19.524471Z",
            "url": "https://files.pythonhosted.org/packages/06/70/00764414c674aee670d95058822419018092d11325f0b2404c14dbb2f2b6/pypi_simple-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2496dc3f15678253d1d5e708d515eb93689d73975bfb6161245c02b103095d11",
                "md5": "26884748761a442f595686695db39c8e",
                "sha256": "c1248d2dfa7ba17762c9d5595b62d6b9067e2f0acd7a6f09e43c65d5f1d6a267"
            },
            "downloads": -1,
            "filename": "pypi_simple-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "26884748761a442f595686695db39c8e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 54721,
            "upload_time": "2024-02-24T21:08:21",
            "upload_time_iso_8601": "2024-02-24T21:08:21.270438Z",
            "url": "https://files.pythonhosted.org/packages/24/96/dc3f15678253d1d5e708d515eb93689d73975bfb6161245c02b103095d11/pypi_simple-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-24 21:08:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jwodder",
    "github_project": "pypi-simple",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pypi-simple"
}
        
Elapsed time: 0.19939s