pulp_python_client
PulpPythonClient - the Ruby gem for the Pulp 3 API
Fetch, Upload, Organize, and Distribute Software Packages
This SDK is automatically generated by the OpenAPI Generator project:
- API version: v3
- Package version: 3.30.2
- Generator version: 7.10.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://pulpproject.org
Installation
Build a gem
To build the Ruby code into a gem:
gem build pulp_python_client.gemspec
Then either install the gem locally:
gem install ./pulp_python_client-3.30.2.gem
(for development, run gem install --dev ./pulp_python_client-3.30.2.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'pulp_python_client', '~> 3.30.2'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'pulp_python_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'pulp_python_client'
# Setup authorization
PulpPythonClient.configure do |config|
# Configure HTTP basic authorization: basicAuth
config.username = 'YOUR_USERNAME'
config.password = 'YOUR_PASSWORD'
# Configure faraday connection
config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
end
api_instance = PulpPythonClient::ContentPackagesApi.new
relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
opts = {
x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
overwrite: true, # Boolean | 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.
pulp_labels: { key: 'inner_example'}, # Hash<String, String> | A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
artifact: 'artifact_example', # String | Artifact file representing the physical content
file: File.new('/path/to/some/file'), # File | An uploaded file that may be turned into the content unit.
upload: 'upload_example', # String | An uncommitted upload that may be turned into the content unit.
file_url: 'file_url_example', # String | A url that Pulp can download and turn into the content unit.
downloader_config: PulpPythonClient::RemoteNetworkConfig.new, # RemoteNetworkConfig | Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
author: 'author_example', # String | Text containing the author's name. Contact information can also be added, separated with newlines.
author_email: 'author_email_example', # String | The author's e-mail address.
description: 'description_example', # String | A longer description of the package that can run to several paragraphs.
home_page: 'home_page_example', # String | The URL for the package's home page.
keywords: 'keywords_example', # String | Additional keywords to be used to assist searching for the package in a larger catalog.
license: 'license_example', # String | Text indicating the license covering the distribution
platform: 'platform_example', # String | A comma-separated list of platform specifications, summarizing the operating systems supported by the package.
summary: 'summary_example', # String | A one-line summary of what the package does.
classifiers: TODO, # Object |
download_url: 'download_url_example', # String | Legacy field denoting the URL from which this package can be downloaded.
supported_platform: 'supported_platform_example', # String | Field to specify the OS and CPU for which the binary package was compiled.
maintainer: 'maintainer_example', # String | The maintainer's name at a minimum; additional contact information may be provided.
maintainer_email: 'maintainer_email_example', # String | The maintainer's e-mail address.
obsoletes_dist: TODO, # Object |
project_url: 'project_url_example', # String | A browsable URL for the project and a label for it, separated by a comma.
project_urls: TODO, # Object |
provides_dist: TODO, # Object |
requires_external: TODO, # Object |
requires_dist: TODO, # Object |
requires_python: 'requires_python_example', # String | The Python version(s) that the distribution is guaranteed to be compatible with.
description_content_type: 'description_content_type_example', # String | A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.
provides_extras: TODO, # Object |
dynamic: TODO, # Object |
license_expression: 'license_expression_example', # String | Text string that is a valid SPDX license expression.
license_file: TODO, # Object |
sha256: 'sha256_example', # String | The SHA256 digest of this package.
metadata_sha256: 'metadata_sha256_example', # String | The SHA256 digest of the package's METADATA file.
attestations: TODO # Object |
}
begin
#Create a python package content
result = api_instance.create(relative_path, opts)
p result
rescue PulpPythonClient::ApiError => e
puts "Exception when calling ContentPackagesApi->create: #{e}"
end
Documentation for API Endpoints
All URIs are relative to http://localhost:24817
| Class | Method | HTTP request | Description |
|---|---|---|---|
| PulpPythonClient::ContentPackagesApi | create | POST /pulp/api/v3/content/python/packages/ | Create a python package content |
| PulpPythonClient::ContentPackagesApi | list | GET /pulp/api/v3/content/python/packages/ | List python package contents |
| PulpPythonClient::ContentPackagesApi | read | GET python_python_package_content_href | Inspect a python package content |
| PulpPythonClient::ContentPackagesApi | set_label | POST python_python_package_content_hrefset_label/ | Set a label |
| PulpPythonClient::ContentPackagesApi | unset_label | POST python_python_package_content_hrefunset_label/ | Unset a label |
| PulpPythonClient::ContentPackagesApi | upload | POST /pulp/api/v3/content/python/packages/upload/ | Synchronous Python package upload |
| PulpPythonClient::ContentProvenanceApi | create | POST /pulp/api/v3/content/python/provenance/ | Create a package provenance |
| PulpPythonClient::ContentProvenanceApi | list | GET /pulp/api/v3/content/python/provenance/ | List package provenances |
| PulpPythonClient::ContentProvenanceApi | read | GET python_package_provenance_href | Inspect a package provenance |
| PulpPythonClient::ContentProvenanceApi | set_label | POST python_package_provenance_hrefset_label/ | Set a label |
| PulpPythonClient::ContentProvenanceApi | unset_label | POST python_package_provenance_hrefunset_label/ | Unset a label |
| PulpPythonClient::DistributionsPypiApi | add_role | POST python_python_distribution_hrefadd_role/ | Add a role |
| PulpPythonClient::DistributionsPypiApi | create | POST /pulp/api/v3/distributions/python/pypi/ | Create a python distribution |
| PulpPythonClient::DistributionsPypiApi | delete | DELETE python_python_distribution_href | Delete a python distribution |
| PulpPythonClient::DistributionsPypiApi | list | GET /pulp/api/v3/distributions/python/pypi/ | List python distributions |
| PulpPythonClient::DistributionsPypiApi | list_roles | GET python_python_distribution_hreflist_roles/ | List roles |
| PulpPythonClient::DistributionsPypiApi | my_permissions | GET python_python_distribution_hrefmy_permissions/ | List user permissions |
| PulpPythonClient::DistributionsPypiApi | partial_update | PATCH python_python_distribution_href | Update a python distribution |
| PulpPythonClient::DistributionsPypiApi | read | GET python_python_distribution_href | Inspect a python distribution |
| PulpPythonClient::DistributionsPypiApi | remove_role | POST python_python_distribution_hrefremove_role/ | Remove a role |
| PulpPythonClient::DistributionsPypiApi | set_label | POST python_python_distribution_hrefset_label/ | Set a label |
| PulpPythonClient::DistributionsPypiApi | unset_label | POST python_python_distribution_hrefunset_label/ | Unset a label |
| PulpPythonClient::DistributionsPypiApi | update | PUT python_python_distribution_href | Update a python distribution |
| PulpPythonClient::PublicationsPypiApi | add_role | POST python_python_publication_hrefadd_role/ | Add a role |
| PulpPythonClient::PublicationsPypiApi | create | POST /pulp/api/v3/publications/python/pypi/ | Create a python publication |
| PulpPythonClient::PublicationsPypiApi | delete | DELETE python_python_publication_href | Delete a python publication |
| PulpPythonClient::PublicationsPypiApi | list | GET /pulp/api/v3/publications/python/pypi/ | List python publications |
| PulpPythonClient::PublicationsPypiApi | list_roles | GET python_python_publication_hreflist_roles/ | List roles |
| PulpPythonClient::PublicationsPypiApi | my_permissions | GET python_python_publication_hrefmy_permissions/ | List user permissions |
| PulpPythonClient::PublicationsPypiApi | read | GET python_python_publication_href | Inspect a python publication |
| PulpPythonClient::PublicationsPypiApi | remove_role | POST python_python_publication_hrefremove_role/ | Remove a role |
| PulpPythonClient::PypiApi | read | GET /pypi/path/ | Get index summary |
| PulpPythonClient::PypiLegacyApi | create | POST /pypi/path/legacy/ | Upload a package |
| PulpPythonClient::PypiMetadataApi | read | GET /pypi/path/pypi/meta/ | Get package metadata |
| PulpPythonClient::PypiProvenanceApi | read | GET /pypi/path/integrity/package/version/filename/provenance/ | Get package provenance |
| PulpPythonClient::PypiSimpleApi | create | POST /pypi/path/simple/ | Upload a package |
| PulpPythonClient::PypiSimpleApi | pypi_simple_package_read | GET /pypi/path/simple/package/ | Get package simple page |
| PulpPythonClient::PypiSimpleApi | read | GET /pypi/path/simple/ | Get index simple page |
| PulpPythonClient::RemotesPythonApi | add_role | POST python_python_remote_hrefadd_role/ | Add a role |
| PulpPythonClient::RemotesPythonApi | create | POST /pulp/api/v3/remotes/python/python/ | Create a python remote |
| PulpPythonClient::RemotesPythonApi | delete | DELETE python_python_remote_href | Delete a python remote |
| PulpPythonClient::RemotesPythonApi | from_bandersnatch | POST /pulp/api/v3/remotes/python/python/from_bandersnatch/ | Create from Bandersnatch |
| PulpPythonClient::RemotesPythonApi | list | GET /pulp/api/v3/remotes/python/python/ | List python remotes |
| PulpPythonClient::RemotesPythonApi | list_roles | GET python_python_remote_hreflist_roles/ | List roles |
| PulpPythonClient::RemotesPythonApi | my_permissions | GET python_python_remote_hrefmy_permissions/ | List user permissions |
| PulpPythonClient::RemotesPythonApi | partial_update | PATCH python_python_remote_href | Update a python remote |
| PulpPythonClient::RemotesPythonApi | read | GET python_python_remote_href | Inspect a python remote |
| PulpPythonClient::RemotesPythonApi | remove_role | POST python_python_remote_hrefremove_role/ | Remove a role |
| PulpPythonClient::RemotesPythonApi | set_label | POST python_python_remote_hrefset_label/ | Set a label |
| PulpPythonClient::RemotesPythonApi | unset_label | POST python_python_remote_hrefunset_label/ | Unset a label |
| PulpPythonClient::RemotesPythonApi | update | PUT python_python_remote_href | Update a python remote |
| PulpPythonClient::RepositoriesPythonApi | add_role | POST python_python_repository_hrefadd_role/ | Add a role |
| PulpPythonClient::RepositoriesPythonApi | create | POST /pulp/api/v3/repositories/python/python/ | Create a python repository |
| PulpPythonClient::RepositoriesPythonApi | delete | DELETE python_python_repository_href | Delete a python repository |
| PulpPythonClient::RepositoriesPythonApi | list | GET /pulp/api/v3/repositories/python/python/ | List python repositorys |
| PulpPythonClient::RepositoriesPythonApi | list_roles | GET python_python_repository_hreflist_roles/ | List roles |
| PulpPythonClient::RepositoriesPythonApi | modify | POST python_python_repository_hrefmodify/ | Modify Repository Content |
| PulpPythonClient::RepositoriesPythonApi | my_permissions | GET python_python_repository_hrefmy_permissions/ | List user permissions |
| PulpPythonClient::RepositoriesPythonApi | partial_update | PATCH python_python_repository_href | Update a python repository |
| PulpPythonClient::RepositoriesPythonApi | read | GET python_python_repository_href | Inspect a python repository |
| PulpPythonClient::RepositoriesPythonApi | remove_role | POST python_python_repository_hrefremove_role/ | Remove a role |
| PulpPythonClient::RepositoriesPythonApi | repair_metadata | POST python_python_repository_hrefrepair_metadata/ | Repair metadata |
| PulpPythonClient::RepositoriesPythonApi | set_label | POST python_python_repository_hrefset_label/ | Set a label |
| PulpPythonClient::RepositoriesPythonApi | sync | POST python_python_repository_hrefsync/ | Sync from remote |
| PulpPythonClient::RepositoriesPythonApi | unset_label | POST python_python_repository_hrefunset_label/ | Unset a label |
| PulpPythonClient::RepositoriesPythonApi | update | PUT python_python_repository_href | Update a python repository |
| PulpPythonClient::RepositoriesPythonBlocklistEntriesApi | create | POST python_python_repository_hrefblocklist_entries/ | Create a python blocklist entry |
| PulpPythonClient::RepositoriesPythonBlocklistEntriesApi | delete | DELETE python_python_python_blocklist_entry_href | Delete a python blocklist entry |
| PulpPythonClient::RepositoriesPythonBlocklistEntriesApi | list | GET python_python_repository_hrefblocklist_entries/ | List python blocklist entrys |
| PulpPythonClient::RepositoriesPythonBlocklistEntriesApi | read | GET python_python_python_blocklist_entry_href | Inspect a python blocklist entry |
| PulpPythonClient::RepositoriesPythonVersionsApi | delete | DELETE python_python_repository_version_href | Delete a repository version |
| PulpPythonClient::RepositoriesPythonVersionsApi | list | GET python_python_repository_hrefversions/ | List repository versions |
| PulpPythonClient::RepositoriesPythonVersionsApi | read | GET python_python_repository_version_href | Inspect a repository version |
| PulpPythonClient::RepositoriesPythonVersionsApi | repair | POST python_python_repository_version_hrefrepair/ | |
| PulpPythonClient::RepositoriesPythonVersionsApi | scan | POST python_python_repository_version_hrefscan/ | Generate vulnerability report |
Documentation for Models
- PulpPythonClient::AsyncOperationResponse
- PulpPythonClient::ContentSummaryResponse
- PulpPythonClient::ExcludePlatformsEnum
- PulpPythonClient::FiletypeEnum
- PulpPythonClient::MetadataVersionEnum
- PulpPythonClient::MyPermissionsResponse
- PulpPythonClient::NestedRole
- PulpPythonClient::NestedRoleResponse
- PulpPythonClient::ObjectRolesResponse
- PulpPythonClient::PackageMetadataResponse
- PulpPythonClient::PackageTypesEnum
- PulpPythonClient::PackageUploadTaskResponse
- PulpPythonClient::PaginatedRepositoryVersionResponseList
- PulpPythonClient::PaginatedpythonPackageProvenanceResponseList
- PulpPythonClient::PaginatedpythonPythonBlocklistEntryResponseList
- PulpPythonClient::PaginatedpythonPythonDistributionResponseList
- PulpPythonClient::PaginatedpythonPythonPackageContentResponseList
- PulpPythonClient::PaginatedpythonPythonPublicationResponseList
- PulpPythonClient::PaginatedpythonPythonRemoteResponseList
- PulpPythonClient::PaginatedpythonPythonRepositoryResponseList
- PulpPythonClient::PatchedpythonPythonDistribution
- PulpPythonClient::PatchedpythonPythonRemote
- PulpPythonClient::PatchedpythonPythonRepository
- PulpPythonClient::PolicyEnum
- PulpPythonClient::ProtocolVersionEnum
- PulpPythonClient::PythonPackageProvenanceResponse
- PulpPythonClient::PythonPythonBlocklistEntry
- PulpPythonClient::PythonPythonBlocklistEntryResponse
- PulpPythonClient::PythonPythonDistribution
- PulpPythonClient::PythonPythonDistributionResponse
- PulpPythonClient::PythonPythonPackageContentResponse
- PulpPythonClient::PythonPythonPublication
- PulpPythonClient::PythonPythonPublicationResponse
- PulpPythonClient::PythonPythonRemote
- PulpPythonClient::PythonPythonRemoteResponse
- PulpPythonClient::PythonPythonRemoteResponseHiddenFieldsInner
- PulpPythonClient::PythonPythonRepository
- PulpPythonClient::PythonPythonRepositoryResponse
- PulpPythonClient::RemoteNetworkConfig
- PulpPythonClient::RemoteNetworkConfigResponse
- PulpPythonClient::Repair
- PulpPythonClient::RepositoryAddRemoveContent
- PulpPythonClient::RepositorySyncURL
- PulpPythonClient::RepositoryVersionResponse
- PulpPythonClient::SetLabel
- PulpPythonClient::SetLabelResponse
- PulpPythonClient::SummaryResponse
- PulpPythonClient::UnsetLabel
- PulpPythonClient::UnsetLabelResponse
Documentation for Authorization
Authentication schemes defined for the API:
basicAuth
- Type: HTTP basic authentication