Skip to main content

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.10.1
  • Generator version: 7.19.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)
    overwrite = True # bool | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true. (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, overwrite=overwrite, 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 add_role POST {npm_npm_distribution_href}add_role/ Add a role
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 list_roles GET {npm_npm_distribution_href}list_roles/ List roles
DistributionsNpmApi my_permissions GET {npm_npm_distribution_href}my_permissions/ List user permissions
DistributionsNpmApi partial_update PATCH {npm_npm_distribution_href} Update a npm distribution
DistributionsNpmApi read GET {npm_npm_distribution_href} Inspect a npm distribution
DistributionsNpmApi remove_role POST {npm_npm_distribution_href}remove_role/ Remove a role
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
NpmApi put PUT /npm/{path}/{package_name}
NpmPingApi get GET /npm/{path}/-/ping
NpmWhoamiApi get GET /npm/{path}/-/whoami
RemotesNpmApi add_role POST {npm_npm_remote_href}add_role/ Add a role
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 list_roles GET {npm_npm_remote_href}list_roles/ List roles
RemotesNpmApi my_permissions GET {npm_npm_remote_href}my_permissions/ List user permissions
RemotesNpmApi partial_update PATCH {npm_npm_remote_href} Update a npm remote
RemotesNpmApi read GET {npm_npm_remote_href} Inspect a npm remote
RemotesNpmApi remove_role POST {npm_npm_remote_href}remove_role/ Remove a role
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 add_role POST {npm_npm_repository_href}add_role/ Add a role
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 list_roles GET {npm_npm_repository_href}list_roles/ List roles
RepositoriesNpmApi modify POST {npm_npm_repository_href}modify/ Modify Repository Content
RepositoriesNpmApi my_permissions GET {npm_npm_repository_href}my_permissions/ List user permissions
RepositoriesNpmApi partial_update PATCH {npm_npm_repository_href} Update a npm repository
RepositoriesNpmApi read GET {npm_npm_repository_href} Inspect a npm repository
RepositoriesNpmApi remove_role POST {npm_npm_repository_href}remove_role/ Remove a role
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

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.10.1.tar.gz (72.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_npm_client-0.10.1-py3-none-any.whl (124.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pulp_npm_client-0.10.1.tar.gz
  • Upload date:
  • Size: 72.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pulp_npm_client-0.10.1.tar.gz
Algorithm Hash digest
SHA256 f8ed78e571458c7426e4c88fbc9af2cba5927cb7f098bef8a823bcc7354c932e
MD5 1f2e7e090c83d4bee002190393bb2712
BLAKE2b-256 5dfb04054a5c30521a1e0f605485c5de7c587bb8a35ad0e2118fb206635564c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulp_npm_client-0.10.1.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.10.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pulp_npm_client-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e5844fb4bff83f3fa74b18de9d25e731d470e8a4df5316f19c744a9577d0158
MD5 a04aed008178caac516264722f2a2f71
BLAKE2b-256 05a0496ed11316c3bb7ed7c9fb1a021cb3ccfcd65e2221987dee5d0a46a41130

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulp_npm_client-0.10.1-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.

Release history Release notifications | RSS feed

This release

0.10.1 This release

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page