{"id":22316659,"url":"https://github.com/developerstoolbox/pypi-extractor-package","last_synced_at":"2025-08-19T18:36:14.169Z","repository":{"id":242575994,"uuid":"808157853","full_name":"DevelopersToolbox/pypi-extractor-package","owner":"DevelopersToolbox","description":"Extract package information for a given user in PyPi.","archived":false,"fork":false,"pushed_at":"2025-07-28T06:32:54.000Z","size":217,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-28T08:25:26.755Z","etag":null,"topics":["pypi","pypi-packages","wolfsoftware"],"latest_commit_sha":null,"homepage":"","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/DevelopersToolbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["WolfSoftware","TGWolf"]}},"created_at":"2024-05-30T13:54:29.000Z","updated_at":"2025-07-28T06:22:37.000Z","dependencies_parsed_at":"2024-06-17T06:25:20.882Z","dependency_job_id":"d3210a50-66be-4c3e-8226-9834c8cd3e1e","html_url":"https://github.com/DevelopersToolbox/pypi-extractor-package","commit_stats":null,"previous_names":["developerstoolbox/pypi-extractor-package"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/DevelopersToolbox/pypi-extractor-package","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevelopersToolbox%2Fpypi-extractor-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevelopersToolbox%2Fpypi-extractor-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevelopersToolbox%2Fpypi-extractor-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevelopersToolbox%2Fpypi-extractor-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevelopersToolbox","download_url":"https://codeload.github.com/DevelopersToolbox/pypi-extractor-package/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevelopersToolbox%2Fpypi-extractor-package/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267686334,"owners_count":24127715,"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-07-29T02:00:12.549Z","response_time":2574,"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":["pypi","pypi-packages","wolfsoftware"],"created_at":"2024-12-03T23:07:23.234Z","updated_at":"2025-07-29T12:30:31.410Z","avatar_url":"https://github.com/DevelopersToolbox.png","language":"Python","readme":"\u003c!-- markdownlint-disable --\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/\"\u003e\n        \u003cimg src=\"https://cdn.wolfsoftware.com/assets/images/github/organisations/developerstoolbox/black-and-white-circle-256.png\" alt=\"DevelopersToolbox logo\" /\u003e\n    \u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/pypi-extractor-package/actions/workflows/cicd.yml\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/DevelopersToolbox/pypi-extractor-package/cicd.yml?branch=master\u0026label=build%20status\u0026style=for-the-badge\" alt=\"Github Build Status\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/pypi-extractor-package/blob/master/LICENSE.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/DevelopersToolbox/pypi-extractor-package?color=blue\u0026label=License\u0026style=for-the-badge\" alt=\"License\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/pypi-extractor-package\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/created-at/DevelopersToolbox/pypi-extractor-package?color=blue\u0026label=Created\u0026style=for-the-badge\" alt=\"Created\"\u003e\n    \u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/pypi-extractor-package/releases/latest\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/release/DevelopersToolbox/pypi-extractor-package?color=blue\u0026label=Latest%20Release\u0026style=for-the-badge\" alt=\"Release\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/pypi-extractor-package/releases/latest\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/release-date/DevelopersToolbox/pypi-extractor-package?color=blue\u0026label=Released\u0026style=for-the-badge\" alt=\"Released\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/pypi-extractor-package/releases/latest\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/commits-since/DevelopersToolbox/pypi-extractor-package/latest.svg?color=blue\u0026style=for-the-badge\" alt=\"Commits since release\"\u003e\n    \u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/pypi-extractor-package/blob/master/.github/CODE_OF_CONDUCT.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Code%20of%20Conduct-blue?style=for-the-badge\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/pypi-extractor-package/blob/master/.github/CONTRIBUTING.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Contributing-blue?style=for-the-badge\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/pypi-extractor-package/blob/master/.github/SECURITY.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Report%20Security%20Concern-blue?style=for-the-badge\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/pypi-extractor-package/issues\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Get%20Support-blue?style=for-the-badge\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Overview\n\nPyPI Extractor is a Python package designed to fetch and process detailed information about packages hosted on the\nPython Package Index (PyPI). This package is particularly useful for users who want to retrieve and analyze metadata for packages\nmaintained by a specific PyPI user.\n\n## Significant Update From 0.1.3\n\npypi.org no longer allow you to scrap details using the requests package, or any package that does not support JavaScript. To resolve this we have\nupdated this package to utilise [PlayWright](https://pypi.org/project/playwright/) when retrieving a list of packages for a given user. While we have \nattempted to automate as much as possible you might want to do some of the work manually.\n\nPlaywright needs two commands to be run in order for it to function correctly:\n\n```\nplaywright install\nplaywright install-deps\n```\n\nWe have added an `auto_install` option to the main class so that you can instruct the package to do the install for you, this helps when installing the\npackage in a fully automated way, e.g. Puppet or similar.\n\n## Features\n\n- Retrieve a list of packages maintained by a specific PyPI user.\n- Fetch detailed metadata for each package, including versions, author information, dependencies, and more.\n- Custom exceptions for handling errors gracefully.\n- Option to set the PyPI username after initializing the class.\n\n## Installation\n\nYou can install the package using pip:\n\n```sh\npip install wolfsoftware.pypi-extractor\n```\n\n## Usage\n\n### Basic Usage\n\nHere's a basic example of how to use the PyPI Extractor:\n\n```python\nfrom wolfsoftware.pypi_extractor import PyPiExtractor\n\n# Initialize without username\npypi_info = PyPiExtractor()\n\n# Set username later\npypi_info.set_username(\"your_pypi_username\")\n\n# Get detailed information for all packages\ntry:\n    packages_details = pypi_info.get_all_packages_details()\n    print(packages_details)\nexcept PyPiExtractorError as e:\n    print(f\"An error occurred: {e.message}\")\n```\n\n### Setting Username During Initialization\n\nYou can also set the username during initialization:\n\n```python\npypi_info = PyPiExtractor(\"your_pypi_username\")\n```\n\n### Retrieving User Packages\n\nYou can retrieve a list of packages maintained by a specific user:\n\n```python\npackages = pypi_info.get_user_packages()\nprint(packages)\n```\n\n### Retrieving Package Details\n\nTo get detailed information about a specific package:\n\n```python\npackage_details = pypi_info.get_package_details(\"package_name\")\nprint(package_details)\n```\n\n## API Reference\n\n### Classes\n\n#### `PyPiExtractor`\n\nA class to fetch and process package details for a given PyPI user.\n\n##### `__init__(self, username: str, verbose: bool, auto_install: bool)`\n\n- Initializes the `PyPiExtractor` with a username.\n- Parameters:\n  - `username` (str): The PyPI username.\n  - `verbose` (bool): Verbose output (Default: False)\n  - `auto_install` (bool): Auto install PlayWright dependencies (Default: False)\n- Raises:\n  - `PyPiExtractorError`: If the username is not provided.\n\n##### `set_username(self, username: str)`\n\n- Sets the PyPI username.\n- Parameters:\n  - `username` (str): The PyPI username.\n- Raises:\n  - `PyPiExtractorError`: If the username is not provided.\n\n##### `enable_verbose(self)`\n\n- Enable verbose mode.\n\n##### `enable_auto_install(self)`\n\n- Enable auto install.\n\n##### `get_user_packages(self) -\u003e list`\n\n- Fetches the list of packages for the given PyPI user.\n- Returns:\n  - `list`: A list of dictionaries containing package names and summaries.\n- Raises:\n  - `PyPiExtractorError`: If there is an error fetching or parsing the user profile.\n\n##### `get_package_details(self, package_name: str) -\u003e dict`\n\n- Fetches detailed information for a specific package.\n- Parameters:\n  - `package_name` (str): The name of the package.\n- Returns:\n  - `dict`: A dictionary containing detailed information about the package.\n- Raises:\n  - `PyPiExtractorError`: If there is an error fetching or parsing the package details.\n\n##### `get_all_packages_details(self) -\u003e list`\n\n- Fetches detailed information for all packages of the given PyPI user.\n- Returns:\n  - `list`: A list of dictionaries containing detailed information about each package.\n- Raises:\n  - `PyPiExtractorError`: If there is an error fetching or processing the package details.\n\n#### `PyPiExtractorError`\n\nCustom exception class for `PyPiExtractor` errors.\n\n\u003cbr /\u003e\n\u003cp align=\"right\"\u003e\u003ca href=\"https://wolfsoftware.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Created%20by%20Wolf%20on%20behalf%20of%20Wolf%20Software-blue?style=for-the-badge\" /\u003e\u003c/a\u003e\u003c/p\u003e\n","funding_links":["https://github.com/sponsors/WolfSoftware","https://github.com/sponsors/TGWolf"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloperstoolbox%2Fpypi-extractor-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloperstoolbox%2Fpypi-extractor-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloperstoolbox%2Fpypi-extractor-package/lists"}