pulp_python_client 3.3.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -4
- data/build/lib/pulpcore/__init__.py +2 -0
- data/build/lib/pulpcore/client/__init__.py +2 -0
- data/build/lib/pulpcore/client/pulp_python/__init__.py +75 -0
- data/build/lib/pulpcore/client/pulp_python/api/__init__.py +15 -0
- data/build/lib/pulpcore/client/pulp_python/api/content_packages_api.py +626 -0
- data/build/lib/pulpcore/client/pulp_python/api/distributions_pypi_api.py +830 -0
- data/build/lib/pulpcore/client/pulp_python/api/publications_pypi_api.py +566 -0
- data/build/lib/pulpcore/client/pulp_python/api/pypi_api.py +162 -0
- data/build/lib/pulpcore/client/pulp_python/api/pypi_legacy_api.py +185 -0
- data/build/lib/pulpcore/client/pulp_python/api/pypi_metadata_api.py +171 -0
- data/build/lib/pulpcore/client/pulp_python/api/pypi_simple_api.py +434 -0
- data/build/lib/pulpcore/client/pulp_python/api/remotes_python_api.py +972 -0
- data/build/lib/pulpcore/client/pulp_python/api/repositories_python_api.py +1063 -0
- data/build/lib/pulpcore/client/pulp_python/api/repositories_python_versions_api.py +614 -0
- data/build/lib/pulpcore/client/pulp_python/api_client.py +667 -0
- data/build/lib/pulpcore/client/pulp_python/configuration.py +427 -0
- data/build/lib/pulpcore/client/pulp_python/exceptions.py +121 -0
- data/build/lib/pulpcore/client/pulp_python/models/__init__.py +51 -0
- data/build/lib/pulpcore/client/pulp_python/models/async_operation_response.py +124 -0
- data/build/lib/pulpcore/client/pulp_python/models/content_summary.py +176 -0
- data/build/lib/pulpcore/client/pulp_python/models/content_summary_response.py +176 -0
- data/build/lib/pulpcore/client/pulp_python/models/exclude_platforms_enum.py +103 -0
- data/build/lib/pulpcore/client/pulp_python/models/package_metadata_response.py +209 -0
- data/build/lib/pulpcore/client/pulp_python/models/package_types_enum.py +107 -0
- data/build/lib/pulpcore/client/pulp_python/models/package_upload.py +187 -0
- data/build/lib/pulpcore/client/pulp_python/models/package_upload_task_response.py +176 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +197 -0
- data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +286 -0
- data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_remote.py +823 -0
- data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_repository.py +259 -0
- data/build/lib/pulpcore/client/pulp_python/models/policy_enum.py +102 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_bander_remote.py +181 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_distribution.py +288 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_distribution_response.py +368 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_package_content.py +824 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_package_content_response.py +933 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_publication.py +149 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_publication_response.py +231 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_remote.py +825 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_remote_response.py +772 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_repository.py +260 -0
- data/build/lib/pulpcore/client/pulp_python/models/python_python_repository_response.py +366 -0
- data/build/lib/pulpcore/client/pulp_python/models/repository_add_remove_content.py +179 -0
- data/build/lib/pulpcore/client/pulp_python/models/repository_sync_url.py +151 -0
- data/build/lib/pulpcore/client/pulp_python/models/repository_version.py +123 -0
- data/build/lib/pulpcore/client/pulp_python/models/repository_version_response.py +257 -0
- data/build/lib/pulpcore/client/pulp_python/models/summary_response.py +182 -0
- data/build/lib/pulpcore/client/pulp_python/rest.py +292 -0
- data/dist/pulp_python-client-3.4.0.tar.gz +0 -0
- data/dist/pulp_python_client-3.4.0-py3-none-any.whl +0 -0
- data/docs/ContentPackagesApi.md +6 -0
- data/docs/DistributionsPypiApi.md +2 -2
- data/docs/PackageMetadataResponse.md +23 -0
- data/docs/PackageUpload.md +21 -0
- data/docs/PackageUploadTaskResponse.md +21 -0
- data/docs/PatchedpythonPythonDistribution.md +3 -1
- data/docs/PatchedpythonPythonRemote.md +1 -1
- data/docs/PublicationsPypiApi.md +1 -1
- data/docs/PypiApi.md +62 -0
- data/docs/PypiLegacyApi.md +70 -0
- data/docs/PypiMetadataApi.md +64 -0
- data/docs/PypiSimpleApi.md +190 -0
- data/docs/PythonBanderRemote.md +1 -1
- data/docs/PythonPythonDistribution.md +3 -1
- data/docs/PythonPythonDistributionResponse.md +4 -2
- data/docs/PythonPythonPackageContent.md +6 -0
- data/docs/PythonPythonPackageContentResponse.md +5 -1
- data/docs/PythonPythonRemote.md +1 -1
- data/docs/PythonPythonRemoteResponse.md +1 -1
- data/docs/RemotesPythonApi.md +3 -3
- data/docs/RepositoriesPythonApi.md +4 -4
- data/docs/SummaryResponse.md +21 -0
- data/lib/pulp_python_client/api/content_packages_api.rb +9 -0
- data/lib/pulp_python_client/api/distributions_pypi_api.rb +4 -4
- data/lib/pulp_python_client/api/publications_pypi_api.rb +2 -2
- data/lib/pulp_python_client/api/pypi_api.rb +90 -0
- data/lib/pulp_python_client/api/pypi_legacy_api.rb +111 -0
- data/lib/pulp_python_client/api/pypi_metadata_api.rb +96 -0
- data/lib/pulp_python_client/api/pypi_simple_api.rb +249 -0
- data/lib/pulp_python_client/api/remotes_python_api.rb +4 -4
- data/lib/pulp_python_client/api/repositories_python_api.rb +8 -8
- data/lib/pulp_python_client/models/package_metadata_response.rb +257 -0
- data/lib/pulp_python_client/models/package_upload.rb +268 -0
- data/lib/pulp_python_client/models/package_upload_task_response.rb +240 -0
- data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +17 -5
- data/lib/pulp_python_client/models/patchedpython_python_remote.rb +1 -1
- data/lib/pulp_python_client/models/python_bander_remote.rb +1 -1
- data/lib/pulp_python_client/models/python_python_distribution.rb +17 -5
- data/lib/pulp_python_client/models/python_python_distribution_response.rb +17 -6
- data/lib/pulp_python_client/models/python_python_package_content.rb +33 -1
- data/lib/pulp_python_client/models/python_python_package_content_response.rb +23 -1
- data/lib/pulp_python_client/models/python_python_remote.rb +1 -1
- data/lib/pulp_python_client/models/python_python_remote_response.rb +1 -1
- data/lib/pulp_python_client/models/summary_response.rb +243 -0
- data/lib/pulp_python_client/version.rb +1 -1
- data/lib/pulp_python_client.rb +8 -0
- data/pulp_python_client.egg-info/PKG-INFO +15 -0
- data/pulp_python_client.egg-info/SOURCES.txt +105 -0
- data/pulp_python_client.egg-info/dependency_links.txt +1 -0
- data/pulp_python_client.egg-info/requires.txt +4 -0
- data/pulp_python_client.egg-info/top_level.txt +1 -0
- data/pulpcore/__init__.py +2 -0
- data/pulpcore/client/__init__.py +2 -0
- data/pulpcore/client/pulp_python/__init__.py +75 -0
- data/pulpcore/client/pulp_python/api/__init__.py +15 -0
- data/pulpcore/client/pulp_python/api/content_packages_api.py +626 -0
- data/pulpcore/client/pulp_python/api/distributions_pypi_api.py +830 -0
- data/pulpcore/client/pulp_python/api/publications_pypi_api.py +566 -0
- data/pulpcore/client/pulp_python/api/pypi_api.py +162 -0
- data/pulpcore/client/pulp_python/api/pypi_legacy_api.py +185 -0
- data/pulpcore/client/pulp_python/api/pypi_metadata_api.py +171 -0
- data/pulpcore/client/pulp_python/api/pypi_simple_api.py +434 -0
- data/pulpcore/client/pulp_python/api/remotes_python_api.py +972 -0
- data/pulpcore/client/pulp_python/api/repositories_python_api.py +1063 -0
- data/pulpcore/client/pulp_python/api/repositories_python_versions_api.py +614 -0
- data/pulpcore/client/pulp_python/api_client.py +667 -0
- data/pulpcore/client/pulp_python/configuration.py +427 -0
- data/pulpcore/client/pulp_python/exceptions.py +121 -0
- data/pulpcore/client/pulp_python/models/__init__.py +51 -0
- data/pulpcore/client/pulp_python/models/async_operation_response.py +124 -0
- data/pulpcore/client/pulp_python/models/content_summary.py +176 -0
- data/pulpcore/client/pulp_python/models/content_summary_response.py +176 -0
- data/pulpcore/client/pulp_python/models/exclude_platforms_enum.py +103 -0
- data/pulpcore/client/pulp_python/models/package_metadata_response.py +209 -0
- data/pulpcore/client/pulp_python/models/package_types_enum.py +107 -0
- data/pulpcore/client/pulp_python/models/package_upload.py +187 -0
- data/pulpcore/client/pulp_python/models/package_upload_task_response.py +176 -0
- data/pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +197 -0
- data/pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +286 -0
- data/pulpcore/client/pulp_python/models/patchedpython_python_remote.py +823 -0
- data/pulpcore/client/pulp_python/models/patchedpython_python_repository.py +259 -0
- data/pulpcore/client/pulp_python/models/policy_enum.py +102 -0
- data/pulpcore/client/pulp_python/models/python_bander_remote.py +181 -0
- data/pulpcore/client/pulp_python/models/python_python_distribution.py +288 -0
- data/pulpcore/client/pulp_python/models/python_python_distribution_response.py +368 -0
- data/pulpcore/client/pulp_python/models/python_python_package_content.py +824 -0
- data/pulpcore/client/pulp_python/models/python_python_package_content_response.py +933 -0
- data/pulpcore/client/pulp_python/models/python_python_publication.py +149 -0
- data/pulpcore/client/pulp_python/models/python_python_publication_response.py +231 -0
- data/pulpcore/client/pulp_python/models/python_python_remote.py +825 -0
- data/pulpcore/client/pulp_python/models/python_python_remote_response.py +772 -0
- data/pulpcore/client/pulp_python/models/python_python_repository.py +260 -0
- data/pulpcore/client/pulp_python/models/python_python_repository_response.py +366 -0
- data/pulpcore/client/pulp_python/models/repository_add_remove_content.py +179 -0
- data/pulpcore/client/pulp_python/models/repository_sync_url.py +151 -0
- data/pulpcore/client/pulp_python/models/repository_version.py +123 -0
- data/pulpcore/client/pulp_python/models/repository_version_response.py +257 -0
- data/pulpcore/client/pulp_python/models/summary_response.py +182 -0
- data/pulpcore/client/pulp_python/rest.py +292 -0
- data/requirements.txt +6 -0
- data/setup.cfg +2 -0
- data/setup.py +42 -0
- data/spec/api/content_packages_api_spec.rb +3 -0
- data/spec/api/distributions_pypi_api_spec.rb +2 -2
- data/spec/api/publications_pypi_api_spec.rb +1 -1
- data/spec/api/pypi_api_spec.rb +49 -0
- data/spec/api/pypi_legacy_api_spec.rb +50 -0
- data/spec/api/pypi_metadata_api_spec.rb +50 -0
- data/spec/api/pypi_simple_api_spec.rb +79 -0
- data/spec/api/remotes_python_api_spec.rb +2 -2
- data/spec/api/repositories_python_api_spec.rb +4 -4
- data/spec/models/package_metadata_response_spec.rb +59 -0
- data/spec/models/package_upload_spec.rb +53 -0
- data/spec/models/package_upload_task_response_spec.rb +53 -0
- data/spec/models/patchedpython_python_distribution_spec.rb +6 -0
- data/spec/models/python_python_distribution_response_spec.rb +6 -0
- data/spec/models/python_python_distribution_spec.rb +6 -0
- data/spec/models/python_python_package_content_response_spec.rb +12 -0
- data/spec/models/python_python_package_content_spec.rb +18 -0
- data/spec/models/summary_response_spec.rb +53 -0
- data/test/__init__.py +0 -0
- data/test/test_async_operation_response.py +54 -0
- data/test/test_content_packages_api.py +55 -0
- data/test/test_content_summary.py +70 -0
- data/test/test_content_summary_response.py +70 -0
- data/test/test_distributions_pypi_api.py +76 -0
- data/test/test_exclude_platforms_enum.py +52 -0
- data/test/test_package_metadata_response.py +60 -0
- data/test/test_package_types_enum.py +52 -0
- data/test/test_package_upload.py +57 -0
- data/test/test_package_upload_task_response.py +58 -0
- data/test/test_paginated_repository_version_response_list.py +64 -0
- data/test/test_paginatedpython_python_distribution_response_list.py +68 -0
- data/test/test_paginatedpython_python_package_content_response_list.py +88 -0
- data/test/test_paginatedpython_python_publication_response_list.py +65 -0
- data/test/test_paginatedpython_python_remote_response_list.py +88 -0
- data/test/test_paginatedpython_python_repository_response_list.py +68 -0
- data/test/test_patchedpython_python_distribution.py +59 -0
- data/test/test_patchedpython_python_remote.py +84 -0
- data/test/test_patchedpython_python_repository.py +58 -0
- data/test/test_policy_enum.py +52 -0
- data/test/test_publications_pypi_api.py +62 -0
- data/test/test_pypi_api.py +41 -0
- data/test/test_pypi_legacy_api.py +41 -0
- data/test/test_pypi_metadata_api.py +41 -0
- data/test/test_pypi_simple_api.py +55 -0
- data/test/test_python_bander_remote.py +57 -0
- data/test/test_python_python_distribution.py +61 -0
- data/test/test_python_python_distribution_response.py +64 -0
- data/test/test_python_python_package_content.py +79 -0
- data/test/test_python_python_package_content_response.py +82 -0
- data/test/test_python_python_publication.py +54 -0
- data/test/test_python_python_publication_response.py +59 -0
- data/test/test_python_python_remote.py +86 -0
- data/test/test_python_python_remote_response.py +84 -0
- data/test/test_python_python_repository.py +59 -0
- data/test/test_python_python_repository_response.py +63 -0
- data/test/test_remotes_python_api.py +83 -0
- data/test/test_repositories_python_api.py +90 -0
- data/test/test_repositories_python_versions_api.py +61 -0
- data/test/test_repository_add_remove_content.py +59 -0
- data/test/test_repository_sync_url.py +54 -0
- data/test/test_repository_version.py +53 -0
- data/test/test_repository_version_response.py +58 -0
- data/test/test_summary_response.py +58 -0
- data/test-requirements.txt +3 -0
- data/tox.ini +9 -0
- metadata +221 -26
@@ -0,0 +1,434 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Pulp 3 API
|
5
|
+
|
6
|
+
Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
|
7
|
+
|
8
|
+
The version of the OpenAPI document: v3
|
9
|
+
Contact: pulp-list@redhat.com
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
"""
|
12
|
+
|
13
|
+
|
14
|
+
from __future__ import absolute_import
|
15
|
+
|
16
|
+
import re # noqa: F401
|
17
|
+
|
18
|
+
# python 2 and python 3 compatibility library
|
19
|
+
import six
|
20
|
+
|
21
|
+
from pulpcore.client.pulp_python.api_client import ApiClient
|
22
|
+
from pulpcore.client.pulp_python.exceptions import ( # noqa: F401
|
23
|
+
ApiTypeError,
|
24
|
+
ApiValueError
|
25
|
+
)
|
26
|
+
|
27
|
+
|
28
|
+
class PypiSimpleApi(object):
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
30
|
+
Ref: https://openapi-generator.tech
|
31
|
+
|
32
|
+
Do not edit the class manually.
|
33
|
+
"""
|
34
|
+
|
35
|
+
def __init__(self, api_client=None):
|
36
|
+
if api_client is None:
|
37
|
+
api_client = ApiClient()
|
38
|
+
self.api_client = api_client
|
39
|
+
|
40
|
+
def create(self, path, content, sha256_digest, **kwargs): # noqa: E501
|
41
|
+
"""Upload a package # noqa: E501
|
42
|
+
|
43
|
+
Upload package to the index. This endpoint has the same functionality as the upload endpoint at the `/legacy` url of the index. This is provided for convenience for users who want a single index url for all their Python tools. (pip, twine, poetry, pipenv, ...) # noqa: E501
|
44
|
+
This method makes a synchronous HTTP request by default. To make an
|
45
|
+
asynchronous HTTP request, please pass async_req=True
|
46
|
+
>>> thread = api.create(path, content, sha256_digest, async_req=True)
|
47
|
+
>>> result = thread.get()
|
48
|
+
|
49
|
+
:param async_req bool: execute request asynchronously
|
50
|
+
:param str path: (required)
|
51
|
+
:param file content: A Python package release file to upload to the index. (required)
|
52
|
+
:param str sha256_digest: SHA256 of package to validate upload integrity. (required)
|
53
|
+
:param str action: Defaults to `file_upload`, don't change it or request will fail!
|
54
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
55
|
+
be returned without reading/decoding response
|
56
|
+
data. Default is True.
|
57
|
+
:param _request_timeout: timeout setting for this request. If one
|
58
|
+
number provided, it will be total request
|
59
|
+
timeout. It can also be a pair (tuple) of
|
60
|
+
(connection, read) timeouts.
|
61
|
+
:return: PackageUploadTaskResponse
|
62
|
+
If the method is called asynchronously,
|
63
|
+
returns the request thread.
|
64
|
+
"""
|
65
|
+
kwargs['_return_http_data_only'] = True
|
66
|
+
return self.create_with_http_info(path, content, sha256_digest, **kwargs) # noqa: E501
|
67
|
+
|
68
|
+
def create_with_http_info(self, path, content, sha256_digest, **kwargs): # noqa: E501
|
69
|
+
"""Upload a package # noqa: E501
|
70
|
+
|
71
|
+
Upload package to the index. This endpoint has the same functionality as the upload endpoint at the `/legacy` url of the index. This is provided for convenience for users who want a single index url for all their Python tools. (pip, twine, poetry, pipenv, ...) # noqa: E501
|
72
|
+
This method makes a synchronous HTTP request by default. To make an
|
73
|
+
asynchronous HTTP request, please pass async_req=True
|
74
|
+
>>> thread = api.create_with_http_info(path, content, sha256_digest, async_req=True)
|
75
|
+
>>> result = thread.get()
|
76
|
+
|
77
|
+
:param async_req bool: execute request asynchronously
|
78
|
+
:param str path: (required)
|
79
|
+
:param file content: A Python package release file to upload to the index. (required)
|
80
|
+
:param str sha256_digest: SHA256 of package to validate upload integrity. (required)
|
81
|
+
:param str action: Defaults to `file_upload`, don't change it or request will fail!
|
82
|
+
:param _return_http_data_only: response data without head status code
|
83
|
+
and headers
|
84
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
85
|
+
be returned without reading/decoding response
|
86
|
+
data. Default is True.
|
87
|
+
:param _request_timeout: timeout setting for this request. If one
|
88
|
+
number provided, it will be total request
|
89
|
+
timeout. It can also be a pair (tuple) of
|
90
|
+
(connection, read) timeouts.
|
91
|
+
:return: tuple(PackageUploadTaskResponse, status_code(int), headers(HTTPHeaderDict))
|
92
|
+
If the method is called asynchronously,
|
93
|
+
returns the request thread.
|
94
|
+
"""
|
95
|
+
|
96
|
+
local_var_params = locals()
|
97
|
+
|
98
|
+
all_params = [
|
99
|
+
'path',
|
100
|
+
'content',
|
101
|
+
'sha256_digest',
|
102
|
+
'action'
|
103
|
+
]
|
104
|
+
all_params.extend(
|
105
|
+
[
|
106
|
+
'async_req',
|
107
|
+
'_return_http_data_only',
|
108
|
+
'_preload_content',
|
109
|
+
'_request_timeout'
|
110
|
+
]
|
111
|
+
)
|
112
|
+
|
113
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
114
|
+
if key not in all_params:
|
115
|
+
raise ApiTypeError(
|
116
|
+
"Got an unexpected keyword argument '%s'"
|
117
|
+
" to method create" % key
|
118
|
+
)
|
119
|
+
local_var_params[key] = val
|
120
|
+
del local_var_params['kwargs']
|
121
|
+
# verify the required parameter 'path' is set
|
122
|
+
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
123
|
+
local_var_params['path'] is None): # noqa: E501
|
124
|
+
raise ApiValueError("Missing the required parameter `path` when calling `create`") # noqa: E501
|
125
|
+
# verify the required parameter 'content' is set
|
126
|
+
if self.api_client.client_side_validation and ('content' not in local_var_params or # noqa: E501
|
127
|
+
local_var_params['content'] is None): # noqa: E501
|
128
|
+
raise ApiValueError("Missing the required parameter `content` when calling `create`") # noqa: E501
|
129
|
+
# verify the required parameter 'sha256_digest' is set
|
130
|
+
if self.api_client.client_side_validation and ('sha256_digest' not in local_var_params or # noqa: E501
|
131
|
+
local_var_params['sha256_digest'] is None): # noqa: E501
|
132
|
+
raise ApiValueError("Missing the required parameter `sha256_digest` when calling `create`") # noqa: E501
|
133
|
+
|
134
|
+
if self.api_client.client_side_validation and ('sha256_digest' in local_var_params and # noqa: E501
|
135
|
+
len(local_var_params['sha256_digest']) > 64): # noqa: E501
|
136
|
+
raise ApiValueError("Invalid value for parameter `sha256_digest` when calling `create`, length must be less than or equal to `64`") # noqa: E501
|
137
|
+
if self.api_client.client_side_validation and ('sha256_digest' in local_var_params and # noqa: E501
|
138
|
+
len(local_var_params['sha256_digest']) < 64): # noqa: E501
|
139
|
+
raise ApiValueError("Invalid value for parameter `sha256_digest` when calling `create`, length must be greater than or equal to `64`") # noqa: E501
|
140
|
+
collection_formats = {}
|
141
|
+
|
142
|
+
path_params = {}
|
143
|
+
if 'path' in local_var_params:
|
144
|
+
path_params['path'] = local_var_params['path'] # noqa: E501
|
145
|
+
|
146
|
+
query_params = []
|
147
|
+
|
148
|
+
header_params = {}
|
149
|
+
|
150
|
+
form_params = []
|
151
|
+
local_var_files = {}
|
152
|
+
if 'content' in local_var_params:
|
153
|
+
local_var_files['content'] = local_var_params['content'] # noqa: E501
|
154
|
+
if 'action' in local_var_params:
|
155
|
+
form_params.append(('action', local_var_params['action'])) # noqa: E501
|
156
|
+
if 'sha256_digest' in local_var_params:
|
157
|
+
form_params.append(('sha256_digest', local_var_params['sha256_digest'])) # noqa: E501
|
158
|
+
|
159
|
+
body_params = None
|
160
|
+
# HTTP header `Accept`
|
161
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
162
|
+
['application/json']) # noqa: E501
|
163
|
+
|
164
|
+
# HTTP header `Content-Type`
|
165
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
166
|
+
['multipart/form-data', 'application/x-www-form-urlencoded']) # noqa: E501
|
167
|
+
|
168
|
+
# Authentication setting
|
169
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
170
|
+
|
171
|
+
return self.api_client.call_api(
|
172
|
+
'/pypi/{path}/simple/', 'POST',
|
173
|
+
path_params,
|
174
|
+
query_params,
|
175
|
+
header_params,
|
176
|
+
body=body_params,
|
177
|
+
post_params=form_params,
|
178
|
+
files=local_var_files,
|
179
|
+
response_type='PackageUploadTaskResponse', # noqa: E501
|
180
|
+
auth_settings=auth_settings,
|
181
|
+
async_req=local_var_params.get('async_req'),
|
182
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
183
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
184
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
185
|
+
collection_formats=collection_formats)
|
186
|
+
|
187
|
+
def read(self, path, **kwargs): # noqa: E501
|
188
|
+
"""Get index simple page # noqa: E501
|
189
|
+
|
190
|
+
Gets the simple api html page for the index. # noqa: E501
|
191
|
+
This method makes a synchronous HTTP request by default. To make an
|
192
|
+
asynchronous HTTP request, please pass async_req=True
|
193
|
+
>>> thread = api.read(path, async_req=True)
|
194
|
+
>>> result = thread.get()
|
195
|
+
|
196
|
+
:param async_req bool: execute request asynchronously
|
197
|
+
:param str path: (required)
|
198
|
+
:param str fields: A list of fields to include in the response.
|
199
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
200
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
201
|
+
be returned without reading/decoding response
|
202
|
+
data. Default is True.
|
203
|
+
:param _request_timeout: timeout setting for this request. If one
|
204
|
+
number provided, it will be total request
|
205
|
+
timeout. It can also be a pair (tuple) of
|
206
|
+
(connection, read) timeouts.
|
207
|
+
:return: None
|
208
|
+
If the method is called asynchronously,
|
209
|
+
returns the request thread.
|
210
|
+
"""
|
211
|
+
kwargs['_return_http_data_only'] = True
|
212
|
+
return self.read_with_http_info(path, **kwargs) # noqa: E501
|
213
|
+
|
214
|
+
def read_with_http_info(self, path, **kwargs): # noqa: E501
|
215
|
+
"""Get index simple page # noqa: E501
|
216
|
+
|
217
|
+
Gets the simple api html page for the index. # noqa: E501
|
218
|
+
This method makes a synchronous HTTP request by default. To make an
|
219
|
+
asynchronous HTTP request, please pass async_req=True
|
220
|
+
>>> thread = api.read_with_http_info(path, async_req=True)
|
221
|
+
>>> result = thread.get()
|
222
|
+
|
223
|
+
:param async_req bool: execute request asynchronously
|
224
|
+
:param str path: (required)
|
225
|
+
:param str fields: A list of fields to include in the response.
|
226
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
227
|
+
:param _return_http_data_only: response data without head status code
|
228
|
+
and headers
|
229
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
230
|
+
be returned without reading/decoding response
|
231
|
+
data. Default is True.
|
232
|
+
:param _request_timeout: timeout setting for this request. If one
|
233
|
+
number provided, it will be total request
|
234
|
+
timeout. It can also be a pair (tuple) of
|
235
|
+
(connection, read) timeouts.
|
236
|
+
:return: None
|
237
|
+
If the method is called asynchronously,
|
238
|
+
returns the request thread.
|
239
|
+
"""
|
240
|
+
|
241
|
+
local_var_params = locals()
|
242
|
+
|
243
|
+
all_params = [
|
244
|
+
'path',
|
245
|
+
'fields',
|
246
|
+
'exclude_fields'
|
247
|
+
]
|
248
|
+
all_params.extend(
|
249
|
+
[
|
250
|
+
'async_req',
|
251
|
+
'_return_http_data_only',
|
252
|
+
'_preload_content',
|
253
|
+
'_request_timeout'
|
254
|
+
]
|
255
|
+
)
|
256
|
+
|
257
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
258
|
+
if key not in all_params:
|
259
|
+
raise ApiTypeError(
|
260
|
+
"Got an unexpected keyword argument '%s'"
|
261
|
+
" to method read" % key
|
262
|
+
)
|
263
|
+
local_var_params[key] = val
|
264
|
+
del local_var_params['kwargs']
|
265
|
+
# verify the required parameter 'path' is set
|
266
|
+
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
267
|
+
local_var_params['path'] is None): # noqa: E501
|
268
|
+
raise ApiValueError("Missing the required parameter `path` when calling `read`") # noqa: E501
|
269
|
+
|
270
|
+
collection_formats = {}
|
271
|
+
|
272
|
+
path_params = {}
|
273
|
+
if 'path' in local_var_params:
|
274
|
+
path_params['path'] = local_var_params['path'] # noqa: E501
|
275
|
+
|
276
|
+
query_params = []
|
277
|
+
if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
|
278
|
+
query_params.append(('fields', local_var_params['fields'])) # noqa: E501
|
279
|
+
if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
|
280
|
+
query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
|
281
|
+
|
282
|
+
header_params = {}
|
283
|
+
|
284
|
+
form_params = []
|
285
|
+
local_var_files = {}
|
286
|
+
|
287
|
+
body_params = None
|
288
|
+
# Authentication setting
|
289
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
290
|
+
|
291
|
+
return self.api_client.call_api(
|
292
|
+
'/pypi/{path}/simple/', 'GET',
|
293
|
+
path_params,
|
294
|
+
query_params,
|
295
|
+
header_params,
|
296
|
+
body=body_params,
|
297
|
+
post_params=form_params,
|
298
|
+
files=local_var_files,
|
299
|
+
response_type=None, # noqa: E501
|
300
|
+
auth_settings=auth_settings,
|
301
|
+
async_req=local_var_params.get('async_req'),
|
302
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
303
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
304
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
305
|
+
collection_formats=collection_formats)
|
306
|
+
|
307
|
+
def read_0(self, package, path, **kwargs): # noqa: E501
|
308
|
+
"""Get package simple page # noqa: E501
|
309
|
+
|
310
|
+
Retrieves the simple api html page for a package. # noqa: E501
|
311
|
+
This method makes a synchronous HTTP request by default. To make an
|
312
|
+
asynchronous HTTP request, please pass async_req=True
|
313
|
+
>>> thread = api.read_0(package, path, async_req=True)
|
314
|
+
>>> result = thread.get()
|
315
|
+
|
316
|
+
:param async_req bool: execute request asynchronously
|
317
|
+
:param str package: (required)
|
318
|
+
:param str path: (required)
|
319
|
+
:param str fields: A list of fields to include in the response.
|
320
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
321
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
322
|
+
be returned without reading/decoding response
|
323
|
+
data. Default is True.
|
324
|
+
:param _request_timeout: timeout setting for this request. If one
|
325
|
+
number provided, it will be total request
|
326
|
+
timeout. It can also be a pair (tuple) of
|
327
|
+
(connection, read) timeouts.
|
328
|
+
:return: None
|
329
|
+
If the method is called asynchronously,
|
330
|
+
returns the request thread.
|
331
|
+
"""
|
332
|
+
kwargs['_return_http_data_only'] = True
|
333
|
+
return self.read_0_with_http_info(package, path, **kwargs) # noqa: E501
|
334
|
+
|
335
|
+
def read_0_with_http_info(self, package, path, **kwargs): # noqa: E501
|
336
|
+
"""Get package simple page # noqa: E501
|
337
|
+
|
338
|
+
Retrieves the simple api html page for a package. # noqa: E501
|
339
|
+
This method makes a synchronous HTTP request by default. To make an
|
340
|
+
asynchronous HTTP request, please pass async_req=True
|
341
|
+
>>> thread = api.read_0_with_http_info(package, path, async_req=True)
|
342
|
+
>>> result = thread.get()
|
343
|
+
|
344
|
+
:param async_req bool: execute request asynchronously
|
345
|
+
:param str package: (required)
|
346
|
+
:param str path: (required)
|
347
|
+
:param str fields: A list of fields to include in the response.
|
348
|
+
:param str exclude_fields: A list of fields to exclude from the response.
|
349
|
+
:param _return_http_data_only: response data without head status code
|
350
|
+
and headers
|
351
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
352
|
+
be returned without reading/decoding response
|
353
|
+
data. Default is True.
|
354
|
+
:param _request_timeout: timeout setting for this request. If one
|
355
|
+
number provided, it will be total request
|
356
|
+
timeout. It can also be a pair (tuple) of
|
357
|
+
(connection, read) timeouts.
|
358
|
+
:return: None
|
359
|
+
If the method is called asynchronously,
|
360
|
+
returns the request thread.
|
361
|
+
"""
|
362
|
+
|
363
|
+
local_var_params = locals()
|
364
|
+
|
365
|
+
all_params = [
|
366
|
+
'package',
|
367
|
+
'path',
|
368
|
+
'fields',
|
369
|
+
'exclude_fields'
|
370
|
+
]
|
371
|
+
all_params.extend(
|
372
|
+
[
|
373
|
+
'async_req',
|
374
|
+
'_return_http_data_only',
|
375
|
+
'_preload_content',
|
376
|
+
'_request_timeout'
|
377
|
+
]
|
378
|
+
)
|
379
|
+
|
380
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
381
|
+
if key not in all_params:
|
382
|
+
raise ApiTypeError(
|
383
|
+
"Got an unexpected keyword argument '%s'"
|
384
|
+
" to method read_0" % key
|
385
|
+
)
|
386
|
+
local_var_params[key] = val
|
387
|
+
del local_var_params['kwargs']
|
388
|
+
# verify the required parameter 'package' is set
|
389
|
+
if self.api_client.client_side_validation and ('package' not in local_var_params or # noqa: E501
|
390
|
+
local_var_params['package'] is None): # noqa: E501
|
391
|
+
raise ApiValueError("Missing the required parameter `package` when calling `read_0`") # noqa: E501
|
392
|
+
# verify the required parameter 'path' is set
|
393
|
+
if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
|
394
|
+
local_var_params['path'] is None): # noqa: E501
|
395
|
+
raise ApiValueError("Missing the required parameter `path` when calling `read_0`") # noqa: E501
|
396
|
+
|
397
|
+
collection_formats = {}
|
398
|
+
|
399
|
+
path_params = {}
|
400
|
+
if 'package' in local_var_params:
|
401
|
+
path_params['package'] = local_var_params['package'] # noqa: E501
|
402
|
+
if 'path' in local_var_params:
|
403
|
+
path_params['path'] = local_var_params['path'] # noqa: E501
|
404
|
+
|
405
|
+
query_params = []
|
406
|
+
if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
|
407
|
+
query_params.append(('fields', local_var_params['fields'])) # noqa: E501
|
408
|
+
if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
|
409
|
+
query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
|
410
|
+
|
411
|
+
header_params = {}
|
412
|
+
|
413
|
+
form_params = []
|
414
|
+
local_var_files = {}
|
415
|
+
|
416
|
+
body_params = None
|
417
|
+
# Authentication setting
|
418
|
+
auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
|
419
|
+
|
420
|
+
return self.api_client.call_api(
|
421
|
+
'/pypi/{path}/simple/{package}/', 'GET',
|
422
|
+
path_params,
|
423
|
+
query_params,
|
424
|
+
header_params,
|
425
|
+
body=body_params,
|
426
|
+
post_params=form_params,
|
427
|
+
files=local_var_files,
|
428
|
+
response_type=None, # noqa: E501
|
429
|
+
auth_settings=auth_settings,
|
430
|
+
async_req=local_var_params.get('async_req'),
|
431
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
432
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
433
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
434
|
+
collection_formats=collection_formats)
|