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.5.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)
relative_path = 'relative_path_example' # str |
name = 'name_example' # str |
version = 'version_example' # str |
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)
try:
# Create a package
api_response = api_instance.create(relative_path, name, version, x_task_diagnostics=x_task_diagnostics, repository=repository, pulp_labels=pulp_labels, artifact=artifact, file=file, upload=upload, file_url=file_url)
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 |
| 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
- AsyncOperationResponse
- ContentSummaryResponse
- NpmNpmDistribution
- NpmNpmDistributionResponse
- NpmNpmRemote
- NpmNpmRemoteResponse
- NpmNpmRemoteResponseHiddenFieldsInner
- NpmNpmRepository
- NpmNpmRepositoryResponse
- NpmPackageResponse
- PaginatedRepositoryVersionResponseList
- PaginatednpmNpmDistributionResponseList
- PaginatednpmNpmRemoteResponseList
- PaginatednpmNpmRepositoryResponseList
- PaginatednpmPackageResponseList
- PatchednpmNpmDistribution
- PatchednpmNpmRemote
- PatchednpmNpmRepository
- PolicyEnum
- Repair
- RepositoryAddRemoveContent
- RepositorySyncURL
- RepositoryVersionResponse
- SetLabel
- SetLabelResponse
- UnsetLabel
- UnsetLabelResponse
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pulp_npm_client-0.5.0.tar.gz.
File metadata
- Download URL: pulp_npm_client-0.5.0.tar.gz
- Upload date:
- Size: 62.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a64c3f38b56eb25d44e315a015d63d5fda1eff20016109c4b83f129dcd45d2e0
|
|
| MD5 |
8a691817a86c30c5ae11af729d33a2b1
|
|
| BLAKE2b-256 |
23cbc2e98e097f7a197d7bb1bea19bba01893b710cbb419c34ca1aa75ebf5d4a
|
File details
Details for the file pulp_npm_client-0.5.0-py3-none-any.whl.
File metadata
- Download URL: pulp_npm_client-0.5.0-py3-none-any.whl
- Upload date:
- Size: 101.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b3d503d0a3c0f4244848040f0fca5768d8f17f8af016e8237d5f4e52d5ee9a5
|
|
| MD5 |
10e2fe113628394fbdc96482f2489bf8
|
|
| BLAKE2b-256 |
7de3dcc25038721da016da44e9c1044dffb5718bd754ece60e4fef97b4150aed
|