Skip to main content

Pulp 3 API

Project description

pulp_npm-client

Fetch, Upload, Organize, and Distribute Software Packages

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

  • API version: v3
  • Package version: 0.7.0
  • 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_npm

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_npm

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import pulpcore.client.pulp_npm
from pulpcore.client.pulp_npm.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_npm.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_npm.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_npm.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulp_npm.ContentPackagesApi(api_client)
    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)
    relative_path = 'relative_path_example' # str | Path where the artifact is located relative to distributions base_path. If not provided, it will be computed from name and version. (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_npm.RemoteNetworkConfig() # RemoteNetworkConfig | Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url. (optional)
    name = 'name_example' # str | The name of the npm package. (optional)
    version = 'version_example' # str | The version of the npm package. (optional)

    try:
        # Create a package
        api_response = api_instance.create(x_task_diagnostics=x_task_diagnostics, repository=repository, pulp_labels=pulp_labels, artifact=artifact, relative_path=relative_path, file=file, upload=upload, file_url=file_url, downloader_config=downloader_config, name=name, version=version)
        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/npm/packages/ Create a package
ContentPackagesApi list GET /pulp/api/v3/content/npm/packages/ List packages
ContentPackagesApi read GET {npm_package_href} Inspect a package
ContentPackagesApi set_label POST {npm_package_href}set_label/ Set a label
ContentPackagesApi unset_label POST {npm_package_href}unset_label/ Unset a label
ContentPackagesApi upload POST /pulp/api/v3/content/npm/packages/upload/ Synchronous npm package upload
DistributionsNpmApi create POST /pulp/api/v3/distributions/npm/npm/ Create a npm distribution
DistributionsNpmApi delete DELETE {npm_npm_distribution_href} Delete a npm distribution
DistributionsNpmApi list GET /pulp/api/v3/distributions/npm/npm/ List npm distributions
DistributionsNpmApi partial_update PATCH {npm_npm_distribution_href} Update a npm distribution
DistributionsNpmApi read GET {npm_npm_distribution_href} Inspect a npm distribution
DistributionsNpmApi set_label POST {npm_npm_distribution_href}set_label/ Set a label
DistributionsNpmApi unset_label POST {npm_npm_distribution_href}unset_label/ Unset a label
DistributionsNpmApi update PUT {npm_npm_distribution_href} Update a npm distribution
RemotesNpmApi create POST /pulp/api/v3/remotes/npm/npm/ Create a npm remote
RemotesNpmApi delete DELETE {npm_npm_remote_href} Delete a npm remote
RemotesNpmApi list GET /pulp/api/v3/remotes/npm/npm/ List npm remotes
RemotesNpmApi partial_update PATCH {npm_npm_remote_href} Update a npm remote
RemotesNpmApi read GET {npm_npm_remote_href} Inspect a npm remote
RemotesNpmApi set_label POST {npm_npm_remote_href}set_label/ Set a label
RemotesNpmApi unset_label POST {npm_npm_remote_href}unset_label/ Unset a label
RemotesNpmApi update PUT {npm_npm_remote_href} Update a npm remote
RepositoriesNpmApi create POST /pulp/api/v3/repositories/npm/npm/ Create a npm repository
RepositoriesNpmApi delete DELETE {npm_npm_repository_href} Delete a npm repository
RepositoriesNpmApi list GET /pulp/api/v3/repositories/npm/npm/ List npm repositorys
RepositoriesNpmApi modify POST {npm_npm_repository_href}modify/ Modify Repository Content
RepositoriesNpmApi partial_update PATCH {npm_npm_repository_href} Update a npm repository
RepositoriesNpmApi read GET {npm_npm_repository_href} Inspect a npm repository
RepositoriesNpmApi set_label POST {npm_npm_repository_href}set_label/ Set a label
RepositoriesNpmApi sync POST {npm_npm_repository_href}sync/ Sync from remote
RepositoriesNpmApi unset_label POST {npm_npm_repository_href}unset_label/ Unset a label
RepositoriesNpmApi update PUT {npm_npm_repository_href} Update a npm repository
RepositoriesNpmVersionsApi delete DELETE {npm_npm_repository_version_href} Delete a repository version
RepositoriesNpmVersionsApi list GET {npm_npm_repository_href}versions/ List repository versions
RepositoriesNpmVersionsApi read GET {npm_npm_repository_version_href} Inspect a repository version
RepositoriesNpmVersionsApi repair POST {npm_npm_repository_version_href}repair/

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_npm_client-0.7.0.tar.gz (64.0 kB view details)

Uploaded Source

Built Distribution

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

pulp_npm_client-0.7.0-py3-none-any.whl (107.4 kB view details)

Uploaded Python 3

File details

Details for the file pulp_npm_client-0.7.0.tar.gz.

File metadata

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

File hashes

Hashes for pulp_npm_client-0.7.0.tar.gz
Algorithm Hash digest
SHA256 3990e127a9bbc6cd2ec3ee122252f048a52ee4a34b5d667cfbda87fde10652d3
MD5 2e5f57422731b559977af97da46d2322
BLAKE2b-256 3ffba6f6f1d98201eb263645b348e1c77cf337ac0873ef467f9f670a8d066ebc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulp_npm_client-0.7.0.tar.gz:

Publisher: publish.yml on pulp/pulp_npm

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_npm_client-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: pulp_npm_client-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 107.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pulp_npm_client-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24ce90bfa3c170a3b6388c6e343eb3afcb8a90ac00ef60469bb1ba5089bb50b7
MD5 024f70151966d7b87179e492e75cf653
BLAKE2b-256 40a05a26b70d6a5c9b526b658cc1073e4eaf9bd6cfc55077a109bf8d2e0943d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulp_npm_client-0.7.0-py3-none-any.whl:

Publisher: publish.yml on pulp/pulp_npm

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