{"id":26440302,"url":"https://github.com/preocts/pypiapi","last_synced_at":"2025-09-14T23:11:23.619Z","repository":{"id":39673309,"uuid":"419169852","full_name":"Preocts/pypiapi","owner":"Preocts","description":"Pull project information from PyPI JSON API.","archived":false,"fork":false,"pushed_at":"2022-06-01T23:17:27.000Z","size":74,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-07T20:52:54.243Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Preocts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-20T03:16:56.000Z","updated_at":"2023-06-22T00:54:06.000Z","dependencies_parsed_at":"2022-09-20T07:23:54.280Z","dependency_job_id":null,"html_url":"https://github.com/Preocts/pypiapi","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Preocts/pypiapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Preocts%2Fpypiapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Preocts%2Fpypiapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Preocts%2Fpypiapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Preocts%2Fpypiapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Preocts","download_url":"https://codeload.github.com/Preocts/pypiapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Preocts%2Fpypiapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275180222,"owners_count":25419066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-18T09:27:38.041Z","updated_at":"2025-09-14T23:11:23.592Z","avatar_url":"https://github.com/Preocts.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Preocts/pypiapi/main.svg)](https://results.pre-commit.ci/latest/github/Preocts/pypiapi/main)\n[![Python Tests](https://github.com/Preocts/pypiapi/actions/workflows/python-tests.yml/badge.svg?branch=main)](https://github.com/Preocts/pypiapi/actions/workflows/python-tests.yml)\n[![codecov](https://codecov.io/gh/Preocts/pypiapi/branch/main/graph/badge.svg?token=9LL6DY1POA)](https://codecov.io/gh/Preocts/pypiapi)\n\n# pypiapi\n\nPull project information from PyPI JSON API.\n\n### Requirements\n- Python \u003e= 3.8\n- httpx \u003e= 0.23.0\n\n\n## Example use:\n```py\nfrom pypiapi import PyPIClient\n\nclient = PyPIClient()\nproject = client.get_project(\"secretbox\")\n# project = client.get_project_by_version(\"secretbox\", \"2.0.1\")\n\nif project is not None:\n    print(f\"Project name: {project.info.name}\")\n    print(f\"Author: {project.info.author}\")\n    for release, release_values in project.releases.items():\n        print(f\"Release '{release}'\")\n        for subrelease in release_values:\n            print(f\"\\tFilename: {subrelease.filename}\")\nelse:\n    print(\"Project not found\")\n```\n\n## Results\n\n```\nProject name: secretbox\nAuthor: Preocts\nRelease '1.0.0'\n        Filename: secretbox-1.0.0-py3-none-any.whl\n        Filename: secretbox-1.0.0.tar.gz\nRelease '1.0.1'\n        Filename: secretbox-1.0.1-py3-none-any.whl\n        Filename: secretbox-1.0.1.tar.gz\nRelease '1.0.2'\n        Filename: secretbox-1.0.2-py3-none-any.whl\n        Filename: secretbox-1.0.2.tar.gz\nRelease '1.1.0'\n        Filename: secretbox-1.1.0-py3-none-any.whl\n        Filename: secretbox-1.1.0.tar.gz\nRelease '1.2.0'\n        Filename: secretbox-1.2.0-py3-none-any.whl\n        Filename: secretbox-1.2.0.tar.gz\n...\n```\n\n---\n\n---\n\n# Local developer installation\n\nIt is **strongly** recommended to use a virtual environment\n([`venv`](https://docs.python.org/3/library/venv.html)) when working with python\nprojects. Leveraging a `venv` will ensure the installed dependency files will\nnot impact other python projects or any system dependencies.\n\nThe following steps outline how to install this repo for local development. See\nthe [CONTRIBUTING.md](../CONTRIBUTING.md) file in the repo root for information\non contributing to the repo.\n\n**Windows users**: Depending on your python install you will use `py` in place\nof `python` to create the `venv`.\n\n**Linux/Mac users**: Replace `python`, if needed, with the appropriate call to\nthe desired version while creating the `venv`. (e.g. `python3` or `python3.8`)\n\n**All users**: Once inside an active `venv` all systems should allow the use of\n`python` for command line instructions. This will ensure you are using the\n`venv`'s python and not the system level python.\n\n---\n\n## Installation steps\n\nClone this repo and enter root directory of repo:\n\n```bash\ngit clone https://github.com/Preocts/pypiapi\ncd pypiapi\n```\n\nCreate the `venv`:\n\n```bash\npython -m venv venv\n```\n\nActivate the `venv`:\n\n```bash\n# Linux/Mac\n. venv/bin/activate\n\n# Windows\nvenv\\Scripts\\activate\n```\n\nThe command prompt should now have a `(venv)` prefix on it. `python` will now\ncall the version of the interpreter used to create the `venv`\n\nInstall editable library and development requirements:\n\n```bash\n# Update pip and tools\npython -m pip install --upgrade pip wheel setuptools\n\n# Install development requirements\npython -m pip install -r requirements-dev.txt\n\n# Install editable version of library\npython -m pip install --editable .\n```\n\nInstall pre-commit [(see below for details)](#pre-commit):\n\n```bash\npre-commit install\n```\n\n---\n\n## Misc Steps\n\nRun pre-commit on all files:\n\n```bash\npre-commit run --all-files\n```\n\nRun tests:\n\n```bash\ntox [-r] [-e py3x]\n```\n\nTo deactivate (exit) the `venv`:\n\n```bash\ndeactivate\n```\n\n---\n\n## [pre-commit](https://pre-commit.com)\n\n\u003e A framework for managing and maintaining multi-language pre-commit hooks.\n\nThis repo is setup with a `.pre-commit-config.yaml` with the expectation that\nany code submitted for review already passes all selected pre-commit checks.\n`pre-commit` is installed with the development requirements and runs seemlessly\nwith `git` hooks.\n\n---\n\n## Makefile\n\nThis repo has a Makefile with some quality of life scripts if the system\nsupports `make`.  Please note there are no checks for an active `venv` in the\nMakefile.\n\n| PHONY             | Description                                                        |\n| ----------------- | ------------------------------------------------------------------ |\n| `init`            | Update pip, setuptools, and wheel to newest version                |\n| `install`         | install the project                                                |\n| `install-dev`     | install development requirements and project                       |\n| `build-dist`      | Build source distribution and wheel distribution                   |\n| `clean-artifacts` | Deletes python/mypy artifacts including eggs, cache, and pyc files |\n| `clean-tests`     | Deletes tox, coverage, and pytest artifacts                        |\n| `clean-build`     | Deletes build artifacts                                            |\n| `clean-all`       | Runs all clean scripts                                             |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreocts%2Fpypiapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreocts%2Fpypiapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreocts%2Fpypiapi/lists"}