Skip to main content

Pulp 3 API

Project description

pulp_python-client

Fetch, Upload, Organize, and Distribute Software Packages

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v3
  • Package version: 3.24.2
  • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://pulpproject.org

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import pulpcore.client.pulp_python

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import pulpcore.client.pulp_python

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import pulpcore.client.pulp_python
from pulpcore.client.pulp_python.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_python.Configuration(
    host = "http://localhost:24817"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_python.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'


# Enter a context with an instance of the API client
with pulpcore.client.pulp_python.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulp_python.ContentPackagesApi(api_client)
    relative_path = 'relative_path_example' # str | Path where the artifact is located relative to distributions base_path
    x_task_diagnostics = ['x_task_diagnostics_example'] # List[str] | List of profilers to use on tasks. (optional)
    repository = 'repository_example' # str | A URI of a repository the new content unit should be associated with. (optional)
    pulp_labels = None # Dict[str, Optional[str]] | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. (optional)
    artifact = 'artifact_example' # str | Artifact file representing the physical content (optional)
    file = None # bytearray | An uploaded file that may be turned into the content unit. (optional)
    upload = 'upload_example' # str | An uncommitted upload that may be turned into the content unit. (optional)
    file_url = 'file_url_example' # str | A url that Pulp can download and turn into the content unit. (optional)
    downloader_config = pulpcore.client.pulp_python.RemoteNetworkConfig() # RemoteNetworkConfig | Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url. (optional)
    author = 'author_example' # str | Text containing the author's name. Contact information can also be added, separated with newlines. (optional)
    author_email = 'author_email_example' # str | The author's e-mail address.  (optional)
    description = 'description_example' # str | A longer description of the package that can run to several paragraphs. (optional)
    home_page = 'home_page_example' # str | The URL for the package's home page. (optional)
    keywords = 'keywords_example' # str | Additional keywords to be used to assist searching for the package in a larger catalog. (optional)
    license = 'license_example' # str | Text indicating the license covering the distribution (optional)
    platform = 'platform_example' # str | A comma-separated list of platform specifications, summarizing the operating systems supported by the package. (optional)
    summary = 'summary_example' # str | A one-line summary of what the package does. (optional)
    classifiers = None # object |  (optional)
    download_url = 'download_url_example' # str | Legacy field denoting the URL from which this package can be downloaded. (optional)
    supported_platform = 'supported_platform_example' # str | Field to specify the OS and CPU for which the binary package was compiled.  (optional)
    maintainer = 'maintainer_example' # str | The maintainer's name at a minimum; additional contact information may be provided. (optional)
    maintainer_email = 'maintainer_email_example' # str | The maintainer's e-mail address. (optional)
    obsoletes_dist = None # object |  (optional)
    project_url = 'project_url_example' # str | A browsable URL for the project and a label for it, separated by a comma. (optional)
    project_urls = None # object |  (optional)
    provides_dist = None # object |  (optional)
    requires_external = None # object |  (optional)
    requires_dist = None # object |  (optional)
    requires_python = 'requires_python_example' # str | The Python version(s) that the distribution is guaranteed to be compatible with. (optional)
    description_content_type = 'description_content_type_example' # str | A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description. (optional)
    provides_extras = None # object |  (optional)
    dynamic = None # object |  (optional)
    license_expression = 'license_expression_example' # str | Text string that is a valid SPDX license expression. (optional)
    license_file = None # object |  (optional)
    sha256 = '' # str | The SHA256 digest of this package. (optional) (default to '')
    metadata_sha256 = 'metadata_sha256_example' # str | The SHA256 digest of the package's METADATA file. (optional)
    attestations = None # object |  (optional)

    try:
        # Create a python package content
        api_response = api_instance.create(relative_path, x_task_diagnostics=x_task_diagnostics, repository=repository, pulp_labels=pulp_labels, artifact=artifact, file=file, upload=upload, file_url=file_url, downloader_config=downloader_config, author=author, author_email=author_email, description=description, home_page=home_page, keywords=keywords, license=license, platform=platform, summary=summary, classifiers=classifiers, download_url=download_url, supported_platform=supported_platform, maintainer=maintainer, maintainer_email=maintainer_email, obsoletes_dist=obsoletes_dist, project_url=project_url, project_urls=project_urls, provides_dist=provides_dist, requires_external=requires_external, requires_dist=requires_dist, requires_python=requires_python, description_content_type=description_content_type, provides_extras=provides_extras, dynamic=dynamic, license_expression=license_expression, license_file=license_file, sha256=sha256, metadata_sha256=metadata_sha256, attestations=attestations)
        print("The response of ContentPackagesApi->create:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ContentPackagesApi->create: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:24817

Class Method HTTP request Description
ContentPackagesApi create POST /pulp/api/v3/content/python/packages/ Create a python package content
ContentPackagesApi list GET /pulp/api/v3/content/python/packages/ List python package contents
ContentPackagesApi read GET {python_python_package_content_href} Inspect a python package content
ContentPackagesApi set_label POST {python_python_package_content_href}set_label/ Set a label
ContentPackagesApi unset_label POST {python_python_package_content_href}unset_label/ Unset a label
ContentPackagesApi upload POST /pulp/api/v3/content/python/packages/upload/ Synchronous Python package upload
ContentProvenanceApi create POST /pulp/api/v3/content/python/provenance/ Create a package provenance
ContentProvenanceApi list GET /pulp/api/v3/content/python/provenance/ List package provenances
ContentProvenanceApi read GET {python_package_provenance_href} Inspect a package provenance
ContentProvenanceApi set_label POST {python_package_provenance_href}set_label/ Set a label
ContentProvenanceApi unset_label POST {python_package_provenance_href}unset_label/ Unset a label
DistributionsPypiApi add_role POST {python_python_distribution_href}add_role/ Add a role
DistributionsPypiApi create POST /pulp/api/v3/distributions/python/pypi/ Create a python distribution
DistributionsPypiApi delete DELETE {python_python_distribution_href} Delete a python distribution
DistributionsPypiApi list GET /pulp/api/v3/distributions/python/pypi/ List python distributions
DistributionsPypiApi list_roles GET {python_python_distribution_href}list_roles/ List roles
DistributionsPypiApi my_permissions GET {python_python_distribution_href}my_permissions/ List user permissions
DistributionsPypiApi partial_update PATCH {python_python_distribution_href} Update a python distribution
DistributionsPypiApi read GET {python_python_distribution_href} Inspect a python distribution
DistributionsPypiApi remove_role POST {python_python_distribution_href}remove_role/ Remove a role
DistributionsPypiApi set_label POST {python_python_distribution_href}set_label/ Set a label
DistributionsPypiApi unset_label POST {python_python_distribution_href}unset_label/ Unset a label
DistributionsPypiApi update PUT {python_python_distribution_href} Update a python distribution
PublicationsPypiApi add_role POST {python_python_publication_href}add_role/ Add a role
PublicationsPypiApi create POST /pulp/api/v3/publications/python/pypi/ Create a python publication
PublicationsPypiApi delete DELETE {python_python_publication_href} Delete a python publication
PublicationsPypiApi list GET /pulp/api/v3/publications/python/pypi/ List python publications
PublicationsPypiApi list_roles GET {python_python_publication_href}list_roles/ List roles
PublicationsPypiApi my_permissions GET {python_python_publication_href}my_permissions/ List user permissions
PublicationsPypiApi read GET {python_python_publication_href} Inspect a python publication
PublicationsPypiApi remove_role POST {python_python_publication_href}remove_role/ Remove a role
PypiApi read GET /pypi/{path}/ Get index summary
PypiLegacyApi create POST /pypi/{path}/legacy/ Upload a package
PypiMetadataApi read GET /pypi/{path}/pypi/{meta}/ Get package metadata
PypiProvenanceApi read GET /pypi/{path}/integrity/{package}/{version}/{filename}/provenance/ Get package provenance
PypiSimpleApi create POST /pypi/{path}/simple/ Upload a package
PypiSimpleApi pypi_simple_package_read GET /pypi/{path}/simple/{package}/ Get package simple page
PypiSimpleApi read GET /pypi/{path}/simple/ Get index simple page
RemotesPythonApi add_role POST {python_python_remote_href}add_role/ Add a role
RemotesPythonApi create POST /pulp/api/v3/remotes/python/python/ Create a python remote
RemotesPythonApi delete DELETE {python_python_remote_href} Delete a python remote
RemotesPythonApi from_bandersnatch POST /pulp/api/v3/remotes/python/python/from_bandersnatch/ Create from Bandersnatch
RemotesPythonApi list GET /pulp/api/v3/remotes/python/python/ List python remotes
RemotesPythonApi list_roles GET {python_python_remote_href}list_roles/ List roles
RemotesPythonApi my_permissions GET {python_python_remote_href}my_permissions/ List user permissions
RemotesPythonApi partial_update PATCH {python_python_remote_href} Update a python remote
RemotesPythonApi read GET {python_python_remote_href} Inspect a python remote
RemotesPythonApi remove_role POST {python_python_remote_href}remove_role/ Remove a role
RemotesPythonApi set_label POST {python_python_remote_href}set_label/ Set a label
RemotesPythonApi unset_label POST {python_python_remote_href}unset_label/ Unset a label
RemotesPythonApi update PUT {python_python_remote_href} Update a python remote
RepositoriesPythonApi add_role POST {python_python_repository_href}add_role/ Add a role
RepositoriesPythonApi create POST /pulp/api/v3/repositories/python/python/ Create a python repository
RepositoriesPythonApi delete DELETE {python_python_repository_href} Delete a python repository
RepositoriesPythonApi list GET /pulp/api/v3/repositories/python/python/ List python repositorys
RepositoriesPythonApi list_roles GET {python_python_repository_href}list_roles/ List roles
RepositoriesPythonApi modify POST {python_python_repository_href}modify/ Modify Repository Content
RepositoriesPythonApi my_permissions GET {python_python_repository_href}my_permissions/ List user permissions
RepositoriesPythonApi partial_update PATCH {python_python_repository_href} Update a python repository
RepositoriesPythonApi read GET {python_python_repository_href} Inspect a python repository
RepositoriesPythonApi remove_role POST {python_python_repository_href}remove_role/ Remove a role
RepositoriesPythonApi repair_metadata POST {python_python_repository_href}repair_metadata/ Repair metadata
RepositoriesPythonApi set_label POST {python_python_repository_href}set_label/ Set a label
RepositoriesPythonApi sync POST {python_python_repository_href}sync/ Sync from remote
RepositoriesPythonApi unset_label POST {python_python_repository_href}unset_label/ Unset a label
RepositoriesPythonApi update PUT {python_python_repository_href} Update a python repository
RepositoriesPythonVersionsApi delete DELETE {python_python_repository_version_href} Delete a repository version
RepositoriesPythonVersionsApi list GET {python_python_repository_href}versions/ List repository versions
RepositoriesPythonVersionsApi read GET {python_python_repository_version_href} Inspect a repository version
RepositoriesPythonVersionsApi repair POST {python_python_repository_version_href}repair/
RepositoriesPythonVersionsApi scan POST {python_python_repository_version_href}scan/ Generate vulnerability report

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

cookieAuth

  • Type: API key
  • API key parameter name: sessionid
  • Location:

Author

pulp-list@redhat.com

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

pulp_python_client-3.24.2.tar.gz (99.9 kB view details)

Uploaded Source

Built Distribution

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

pulp_python_client-3.24.2-py3-none-any.whl (170.2 kB view details)

Uploaded Python 3

File details

Details for the file pulp_python_client-3.24.2.tar.gz.

File metadata

  • Download URL: pulp_python_client-3.24.2.tar.gz
  • Upload date:
  • Size: 99.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pulp_python_client-3.24.2.tar.gz
Algorithm Hash digest
SHA256 c93bcb27209643e98a933eed7528f3715f7b302c2f0ceacc4befd0a37ac50ab0
MD5 f8d1644810439180f3daa95ce3842671
BLAKE2b-256 767b61dbc9aab2d924183973739285d2285637f0ce4cc325cd93586d82427032

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulp_python_client-3.24.2.tar.gz:

Publisher: publish.yml on pulp/pulp_python

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

File details

Details for the file pulp_python_client-3.24.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pulp_python_client-3.24.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a2254ecd0f9ea8066b00b1ee03c768fa93805816415f5467cc28b3224226216
MD5 94918244720d248328d6cdf2867a2275
BLAKE2b-256 ed71f5a1a21a5dd3c9976b38bed7bba1cf33170d5d3574c37f1c0f74c13ff59c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulp_python_client-3.24.2-py3-none-any.whl:

Publisher: publish.yml on pulp/pulp_python

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