wolfsoftware.dockerhub-extractor


Namewolfsoftware.dockerhub-extractor JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/DevelopersToolbox/dockerhub-extractor-package
SummaryExtract container information for a given user in DockerHub.
upload_time2024-06-11 17:36:47
maintainerNone
docs_urlNone
authorWolf Software
requires_python>=3.9
licenseMIT
keywords python dockerhub
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- markdownlint-disable -->
<p align="center">
    <a href="https://github.com/DevelopersToolbox/">
        <img src="https://cdn.wolfsoftware.com/assets/images/github/organisations/developerstoolbox/black-and-white-circle-256.png" alt="DevelopersToolbox logo" />
    </a>
    <br />
    <a href="https://github.com/DevelopersToolbox/dockerhub-extractor-package/actions/workflows/cicd.yml">
        <img src="https://img.shields.io/github/actions/workflow/status/DevelopersToolbox/dockerhub-extractor-package/cicd.yml?branch=master&label=build%20status&style=for-the-badge" alt="Github Build Status" />
    </a>
    <a href="https://github.com/DevelopersToolbox/dockerhub-extractor-package/blob/master/LICENSE.md">
        <img src="https://img.shields.io/github/license/DevelopersToolbox/dockerhub-extractor-package?color=blue&label=License&style=for-the-badge" alt="License">
    </a>
    <a href="https://github.com/DevelopersToolbox/dockerhub-extractor-package">
        <img src="https://img.shields.io/github/created-at/DevelopersToolbox/dockerhub-extractor-package?color=blue&label=Created&style=for-the-badge" alt="Created">
    </a>
    <br />
    <a href="https://github.com/DevelopersToolbox/dockerhub-extractor-package/releases/latest">
        <img src="https://img.shields.io/github/v/release/DevelopersToolbox/dockerhub-extractor-package?color=blue&label=Latest%20Release&style=for-the-badge" alt="Release">
    </a>
    <a href="https://github.com/DevelopersToolbox/dockerhub-extractor-package/releases/latest">
        <img src="https://img.shields.io/github/release-date/DevelopersToolbox/dockerhub-extractor-package?color=blue&label=Released&style=for-the-badge" alt="Released">
    </a>
    <a href="https://github.com/DevelopersToolbox/dockerhub-extractor-package/releases/latest">
        <img src="https://img.shields.io/github/commits-since/DevelopersToolbox/dockerhub-extractor-package/latest.svg?color=blue&style=for-the-badge" alt="Commits since release">
    </a>
    <br />
    <a href="https://github.com/DevelopersToolbox/dockerhub-extractor-package/blob/master/.github/CODE_OF_CONDUCT.md">
        <img src="https://img.shields.io/badge/Code%20of%20Conduct-blue?style=for-the-badge" />
    </a>
    <a href="https://github.com/DevelopersToolbox/dockerhub-extractor-package/blob/master/.github/CONTRIBUTING.md">
        <img src="https://img.shields.io/badge/Contributing-blue?style=for-the-badge" />
    </a>
    <a href="https://github.com/DevelopersToolbox/dockerhub-extractor-package/blob/master/.github/SECURITY.md">
        <img src="https://img.shields.io/badge/Report%20Security%20Concern-blue?style=for-the-badge" />
    </a>
    <a href="https://github.com/DevelopersToolbox/dockerhub-extractor-package/issues">
        <img src="https://img.shields.io/badge/Get%20Support-blue?style=for-the-badge" />
    </a>
</p>

## Overview

DockerHub Extractor is a Python package designed to fetch and process detailed information about repositories hosted on Docker Hub.
This package is particularly useful for users who want to retrieve and analyze metadata for repositories maintained by a specific Docker Hub user.

## Features

- Retrieve a list of repositories maintained by a specific Docker Hub user.
- Fetch detailed metadata for each repository, including information such as tags, stars, pulls, and more.
- Custom exceptions for handling errors gracefully.
- Option to set the Docker Hub username after initializing the class.

## Installation

You can install the package using pip:

```sh
pip install wolfsoftware.dockerhub-extractor
```

## Usage

### Basic Usage

Here's a basic example of how to use the DockerHub Extractor:

```python
from wolfsoftware.dockerhub_extractor import DockerHubExtractor

# Initialize without username
dockerhub_extractor = DockerHubExtractor()

# Set username later
dockerhub_extractor.set_username("your_dockerhub_username")

# Get detailed information for all repositories
try:
    repositories_details = dockerhub_extractor.get_all_repositories_details()
    print(repositories_details)
except DockerHubExtractorError as e:
    print(f"An error occurred: {e.message}")
```

### Setting Username During Initialization

You can also set the username during initialization:

```python
dockerhub_extractor = DockerHubExtractor("your_dockerhub_username")
```

### Retrieving User Repositories

You can retrieve a list of repositories maintained by a specific user:

```python
repositories = dockerhub_extractor.get_user_repositories()
print(repositories)
```

### Retrieving Repository Details

To get detailed information about a specific repository:

```python
repository_details = dockerhub_extractor.get_repository_details("repository_name")
print(repository_details)
```

## API Reference

### Classes

#### `DockerHubExtractor`

A class to fetch and process repository details for a given Docker Hub user.

##### `__init__(self, username: str)`

- Initializes the `DockerHubExtractor` with a username.
- Parameters:
  - `username` (str): The Docker Hub username.
- Raises:
  - `DockerHubExtractorError`: If the username is not provided.

##### `set_username(self, username: str)`

- Sets the Docker Hub username.
- Parameters:
  - `username` (str): The Docker Hub username.
- Raises:
  - `DockerHubExtractorError`: If the username is not provided.

##### `get_user_repositories(self) -> list`

- Fetches the list of repositories for the given Docker Hub user.
- Returns:
  - `list`: A list of dictionaries containing repository names and summaries.
- Raises:
  - `DockerHubExtractorError`: If there is an error fetching or parsing the user profile.

##### `get_repository_details(self, repository_name: str) -> dict`

- Fetches detailed information for a specific repository.
- Parameters:
  - `repository_name` (str): The name of the repository.
- Returns:
  - `dict`: A dictionary containing detailed information about the repository.
- Raises:
  - `DockerHubExtractorError`: If there is an error fetching or parsing the repository details.

##### `get_all_repositories_details(self) -> list`

- Fetches detailed information for all repositories of the given Docker Hub user.
- Returns:
  - `list`: A list of dictionaries containing detailed information about each repository.
- Raises:
  - `DockerHubExtractorError`: If there is an error fetching or processing the repository details.

#### `DockerHubExtractorError`

Custom exception class for `DockerHubExtractor` errors.

<br />
<p align="right"><a href="https://wolfsoftware.com/"><img src="https://img.shields.io/badge/Created%20by%20Wolf%20on%20behalf%20of%20Wolf%20Software-blue?style=for-the-badge" /></a></p>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DevelopersToolbox/dockerhub-extractor-package",
    "name": "wolfsoftware.dockerhub-extractor",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "python, dockerhub",
    "author": "Wolf Software",
    "author_email": "pypi@wolfsoftware.com",
    "download_url": "https://files.pythonhosted.org/packages/7a/b6/c3d4ebc3638a16916869874465afaf3c7934a31c63837c810e1666a6cbb5/wolfsoftware_dockerhub_extractor-0.1.0.tar.gz",
    "platform": null,
    "description": "<!-- markdownlint-disable -->\n<p align=\"center\">\n    <a href=\"https://github.com/DevelopersToolbox/\">\n        <img src=\"https://cdn.wolfsoftware.com/assets/images/github/organisations/developerstoolbox/black-and-white-circle-256.png\" alt=\"DevelopersToolbox logo\" />\n    </a>\n    <br />\n    <a href=\"https://github.com/DevelopersToolbox/dockerhub-extractor-package/actions/workflows/cicd.yml\">\n        <img src=\"https://img.shields.io/github/actions/workflow/status/DevelopersToolbox/dockerhub-extractor-package/cicd.yml?branch=master&label=build%20status&style=for-the-badge\" alt=\"Github Build Status\" />\n    </a>\n    <a href=\"https://github.com/DevelopersToolbox/dockerhub-extractor-package/blob/master/LICENSE.md\">\n        <img src=\"https://img.shields.io/github/license/DevelopersToolbox/dockerhub-extractor-package?color=blue&label=License&style=for-the-badge\" alt=\"License\">\n    </a>\n    <a href=\"https://github.com/DevelopersToolbox/dockerhub-extractor-package\">\n        <img src=\"https://img.shields.io/github/created-at/DevelopersToolbox/dockerhub-extractor-package?color=blue&label=Created&style=for-the-badge\" alt=\"Created\">\n    </a>\n    <br />\n    <a href=\"https://github.com/DevelopersToolbox/dockerhub-extractor-package/releases/latest\">\n        <img src=\"https://img.shields.io/github/v/release/DevelopersToolbox/dockerhub-extractor-package?color=blue&label=Latest%20Release&style=for-the-badge\" alt=\"Release\">\n    </a>\n    <a href=\"https://github.com/DevelopersToolbox/dockerhub-extractor-package/releases/latest\">\n        <img src=\"https://img.shields.io/github/release-date/DevelopersToolbox/dockerhub-extractor-package?color=blue&label=Released&style=for-the-badge\" alt=\"Released\">\n    </a>\n    <a href=\"https://github.com/DevelopersToolbox/dockerhub-extractor-package/releases/latest\">\n        <img src=\"https://img.shields.io/github/commits-since/DevelopersToolbox/dockerhub-extractor-package/latest.svg?color=blue&style=for-the-badge\" alt=\"Commits since release\">\n    </a>\n    <br />\n    <a href=\"https://github.com/DevelopersToolbox/dockerhub-extractor-package/blob/master/.github/CODE_OF_CONDUCT.md\">\n        <img src=\"https://img.shields.io/badge/Code%20of%20Conduct-blue?style=for-the-badge\" />\n    </a>\n    <a href=\"https://github.com/DevelopersToolbox/dockerhub-extractor-package/blob/master/.github/CONTRIBUTING.md\">\n        <img src=\"https://img.shields.io/badge/Contributing-blue?style=for-the-badge\" />\n    </a>\n    <a href=\"https://github.com/DevelopersToolbox/dockerhub-extractor-package/blob/master/.github/SECURITY.md\">\n        <img src=\"https://img.shields.io/badge/Report%20Security%20Concern-blue?style=for-the-badge\" />\n    </a>\n    <a href=\"https://github.com/DevelopersToolbox/dockerhub-extractor-package/issues\">\n        <img src=\"https://img.shields.io/badge/Get%20Support-blue?style=for-the-badge\" />\n    </a>\n</p>\n\n## Overview\n\nDockerHub Extractor is a Python package designed to fetch and process detailed information about repositories hosted on Docker Hub.\nThis package is particularly useful for users who want to retrieve and analyze metadata for repositories maintained by a specific Docker Hub user.\n\n## Features\n\n- Retrieve a list of repositories maintained by a specific Docker Hub user.\n- Fetch detailed metadata for each repository, including information such as tags, stars, pulls, and more.\n- Custom exceptions for handling errors gracefully.\n- Option to set the Docker Hub username after initializing the class.\n\n## Installation\n\nYou can install the package using pip:\n\n```sh\npip install wolfsoftware.dockerhub-extractor\n```\n\n## Usage\n\n### Basic Usage\n\nHere's a basic example of how to use the DockerHub Extractor:\n\n```python\nfrom wolfsoftware.dockerhub_extractor import DockerHubExtractor\n\n# Initialize without username\ndockerhub_extractor = DockerHubExtractor()\n\n# Set username later\ndockerhub_extractor.set_username(\"your_dockerhub_username\")\n\n# Get detailed information for all repositories\ntry:\n    repositories_details = dockerhub_extractor.get_all_repositories_details()\n    print(repositories_details)\nexcept DockerHubExtractorError 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\ndockerhub_extractor = DockerHubExtractor(\"your_dockerhub_username\")\n```\n\n### Retrieving User Repositories\n\nYou can retrieve a list of repositories maintained by a specific user:\n\n```python\nrepositories = dockerhub_extractor.get_user_repositories()\nprint(repositories)\n```\n\n### Retrieving Repository Details\n\nTo get detailed information about a specific repository:\n\n```python\nrepository_details = dockerhub_extractor.get_repository_details(\"repository_name\")\nprint(repository_details)\n```\n\n## API Reference\n\n### Classes\n\n#### `DockerHubExtractor`\n\nA class to fetch and process repository details for a given Docker Hub user.\n\n##### `__init__(self, username: str)`\n\n- Initializes the `DockerHubExtractor` with a username.\n- Parameters:\n  - `username` (str): The Docker Hub username.\n- Raises:\n  - `DockerHubExtractorError`: If the username is not provided.\n\n##### `set_username(self, username: str)`\n\n- Sets the Docker Hub username.\n- Parameters:\n  - `username` (str): The Docker Hub username.\n- Raises:\n  - `DockerHubExtractorError`: If the username is not provided.\n\n##### `get_user_repositories(self) -> list`\n\n- Fetches the list of repositories for the given Docker Hub user.\n- Returns:\n  - `list`: A list of dictionaries containing repository names and summaries.\n- Raises:\n  - `DockerHubExtractorError`: If there is an error fetching or parsing the user profile.\n\n##### `get_repository_details(self, repository_name: str) -> dict`\n\n- Fetches detailed information for a specific repository.\n- Parameters:\n  - `repository_name` (str): The name of the repository.\n- Returns:\n  - `dict`: A dictionary containing detailed information about the repository.\n- Raises:\n  - `DockerHubExtractorError`: If there is an error fetching or parsing the repository details.\n\n##### `get_all_repositories_details(self) -> list`\n\n- Fetches detailed information for all repositories of the given Docker Hub user.\n- Returns:\n  - `list`: A list of dictionaries containing detailed information about each repository.\n- Raises:\n  - `DockerHubExtractorError`: If there is an error fetching or processing the repository details.\n\n#### `DockerHubExtractorError`\n\nCustom exception class for `DockerHubExtractor` errors.\n\n<br />\n<p align=\"right\"><a href=\"https://wolfsoftware.com/\"><img src=\"https://img.shields.io/badge/Created%20by%20Wolf%20on%20behalf%20of%20Wolf%20Software-blue?style=for-the-badge\" /></a></p>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Extract container information for a given user in DockerHub.",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://github.com/DevelopersToolbox/dockerhub-extractor-package",
        "Homepage": "https://github.com/DevelopersToolbox/dockerhub-extractor-package",
        "Source": "https://github.com/DevelopersToolbox/dockerhub-extractor-package",
        "Sponsor": "https://github.com/sponsors/WolfSoftware",
        "Tracker": "https://github.com/wDevelopersToolbox/dockerhub-extractor-package/issues/"
    },
    "split_keywords": [
        "python",
        " dockerhub"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4cce401a64551963477a4d09062b57785efe51de622af86064a70a0a462cd690",
                "md5": "212585ca4c606db20aa38d9be5bd0879",
                "sha256": "f9a3ff83afaefc073330a6c6ccb0d4acad6de4651b10284e23193db545f46cd8"
            },
            "downloads": -1,
            "filename": "wolfsoftware.dockerhub_extractor-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "212585ca4c606db20aa38d9be5bd0879",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7087,
            "upload_time": "2024-06-11T17:36:46",
            "upload_time_iso_8601": "2024-06-11T17:36:46.230948Z",
            "url": "https://files.pythonhosted.org/packages/4c/ce/401a64551963477a4d09062b57785efe51de622af86064a70a0a462cd690/wolfsoftware.dockerhub_extractor-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ab6c3d4ebc3638a16916869874465afaf3c7934a31c63837c810e1666a6cbb5",
                "md5": "7858cf3120f59c35b520a302b4fbf5d6",
                "sha256": "5fdf9effe9c2ac3c6529297bc9471803e813535d625eb448ac8c0782963862d8"
            },
            "downloads": -1,
            "filename": "wolfsoftware_dockerhub_extractor-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7858cf3120f59c35b520a302b4fbf5d6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 9244,
            "upload_time": "2024-06-11T17:36:47",
            "upload_time_iso_8601": "2024-06-11T17:36:47.628592Z",
            "url": "https://files.pythonhosted.org/packages/7a/b6/c3d4ebc3638a16916869874465afaf3c7934a31c63837c810e1666a6cbb5/wolfsoftware_dockerhub_extractor-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-11 17:36:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DevelopersToolbox",
    "github_project": "dockerhub-extractor-package",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "wolfsoftware.dockerhub-extractor"
}
        
Elapsed time: 4.96247s