pulp-python-client 3.17.1__py3-none-any.whl → 3.19.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulp-python-client might be problematic. Click here for more details.

Files changed (47) hide show
  1. pulp_python_client-3.19.0.dist-info/METADATA +287 -0
  2. {pulp_python_client-3.17.1.dist-info → pulp_python_client-3.19.0.dist-info}/RECORD +46 -46
  3. pulpcore/client/pulp_python/__init__.py +121 -59
  4. pulpcore/client/pulp_python/api/content_packages_api.py +802 -60
  5. pulpcore/client/pulp_python/api_client.py +6 -2
  6. pulpcore/client/pulp_python/configuration.py +10 -3
  7. pulpcore/client/pulp_python/exceptions.py +17 -0
  8. pulpcore/client/pulp_python/models/async_operation_response.py +8 -0
  9. pulpcore/client/pulp_python/models/content_summary_response.py +8 -0
  10. pulpcore/client/pulp_python/models/my_permissions_response.py +8 -0
  11. pulpcore/client/pulp_python/models/nested_role.py +8 -0
  12. pulpcore/client/pulp_python/models/nested_role_response.py +8 -0
  13. pulpcore/client/pulp_python/models/object_roles_response.py +8 -0
  14. pulpcore/client/pulp_python/models/package_metadata_response.py +10 -2
  15. pulpcore/client/pulp_python/models/package_upload_task_response.py +8 -0
  16. pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +8 -10
  17. pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +8 -10
  18. pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +8 -10
  19. pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +8 -10
  20. pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +8 -10
  21. pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +8 -10
  22. pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +8 -0
  23. pulpcore/client/pulp_python/models/patchedpython_python_remote.py +9 -1
  24. pulpcore/client/pulp_python/models/patchedpython_python_repository.py +10 -2
  25. pulpcore/client/pulp_python/models/python_python_distribution.py +8 -0
  26. pulpcore/client/pulp_python/models/python_python_distribution_response.py +8 -0
  27. pulpcore/client/pulp_python/models/python_python_package_content_response.py +23 -11
  28. pulpcore/client/pulp_python/models/python_python_publication.py +8 -0
  29. pulpcore/client/pulp_python/models/python_python_publication_response.py +8 -2
  30. pulpcore/client/pulp_python/models/python_python_remote.py +9 -1
  31. pulpcore/client/pulp_python/models/python_python_remote_response.py +9 -3
  32. pulpcore/client/pulp_python/models/python_python_remote_response_hidden_fields_inner.py +8 -0
  33. pulpcore/client/pulp_python/models/python_python_repository.py +10 -2
  34. pulpcore/client/pulp_python/models/python_python_repository_response.py +10 -3
  35. pulpcore/client/pulp_python/models/repair.py +8 -0
  36. pulpcore/client/pulp_python/models/repository_add_remove_content.py +8 -0
  37. pulpcore/client/pulp_python/models/repository_sync_url.py +8 -0
  38. pulpcore/client/pulp_python/models/repository_version_response.py +14 -2
  39. pulpcore/client/pulp_python/models/set_label.py +8 -0
  40. pulpcore/client/pulp_python/models/set_label_response.py +8 -0
  41. pulpcore/client/pulp_python/models/summary_response.py +8 -0
  42. pulpcore/client/pulp_python/models/unset_label.py +8 -0
  43. pulpcore/client/pulp_python/models/unset_label_response.py +8 -0
  44. pulpcore/client/pulp_python/rest.py +1 -0
  45. pulp_python_client-3.17.1.dist-info/METADATA +0 -17
  46. {pulp_python_client-3.17.1.dist-info → pulp_python_client-3.19.0.dist-info}/WHEEL +0 -0
  47. {pulp_python_client-3.17.1.dist-info → pulp_python_client-3.19.0.dist-info}/top_level.txt +0 -0
@@ -65,23 +65,23 @@ class ContentPackagesApi:
65
65
  license: Annotated[Optional[StrictStr], Field(description="Text indicating the license covering the distribution")] = None,
66
66
  platform: Annotated[Optional[StrictStr], Field(description="A comma-separated list of platform specifications, summarizing the operating systems supported by the package.")] = None,
67
67
  summary: Annotated[Optional[StrictStr], Field(description="A one-line summary of what the package does.")] = None,
68
- classifiers: Annotated[Optional[Any], Field(description="A JSON list containing classification values for a Python package.")] = None,
68
+ classifiers: Optional[Any] = None,
69
69
  download_url: Annotated[Optional[StrictStr], Field(description="Legacy field denoting the URL from which this package can be downloaded.")] = None,
70
70
  supported_platform: Annotated[Optional[StrictStr], Field(description="Field to specify the OS and CPU for which the binary package was compiled. ")] = None,
71
71
  maintainer: Annotated[Optional[StrictStr], Field(description="The maintainer's name at a minimum; additional contact information may be provided.")] = None,
72
72
  maintainer_email: Annotated[Optional[StrictStr], Field(description="The maintainer's e-mail address.")] = None,
73
- obsoletes_dist: Annotated[Optional[Any], Field(description="A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.")] = None,
73
+ obsoletes_dist: Optional[Any] = None,
74
74
  project_url: Annotated[Optional[StrictStr], Field(description="A browsable URL for the project and a label for it, separated by a comma.")] = None,
75
- project_urls: Annotated[Optional[Any], Field(description="A dictionary of labels and URLs for the project.")] = None,
76
- provides_dist: Annotated[Optional[Any], Field(description="A JSON list containing names of a Distutils project which is contained within this distribution.")] = None,
77
- requires_external: Annotated[Optional[Any], Field(description="A JSON list containing some dependency in the system that the distribution is to be used.")] = None,
78
- requires_dist: Annotated[Optional[Any], Field(description="A JSON list containing names of some other distutils project required by this distribution.")] = None,
75
+ project_urls: Optional[Any] = None,
76
+ provides_dist: Optional[Any] = None,
77
+ requires_external: Optional[Any] = None,
78
+ requires_dist: Optional[Any] = None,
79
79
  requires_python: Annotated[Optional[StrictStr], Field(description="The Python version(s) that the distribution is guaranteed to be compatible with.")] = None,
80
- description_content_type: Annotated[Optional[StrictStr], Field(description="A string stating the markup syntax (if any) used in the distributions description, so that tools can intelligently render the description.")] = None,
81
- provides_extras: Annotated[Optional[Any], Field(description="A JSON list containing names of optional features provided by the package.")] = None,
82
- dynamic: Annotated[Optional[Any], Field(description="A JSON list containing names of other core metadata fields which are permitted to vary between sdist and bdist packages. Fields NOT marked dynamic MUST be the same between bdist and sdist.")] = None,
80
+ description_content_type: Annotated[Optional[StrictStr], Field(description="A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.")] = None,
81
+ provides_extras: Optional[Any] = None,
82
+ dynamic: Optional[Any] = None,
83
83
  license_expression: Annotated[Optional[StrictStr], Field(description="Text string that is a valid SPDX license expression.")] = None,
84
- license_file: Annotated[Optional[Any], Field(description="A JSON list containing names of the paths to license-related files.")] = None,
84
+ license_file: Optional[Any] = None,
85
85
  sha256: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="The SHA256 digest of this package.")] = None,
86
86
  _request_timeout: Union[
87
87
  None,
@@ -132,7 +132,7 @@ class ContentPackagesApi:
132
132
  :type platform: str
133
133
  :param summary: A one-line summary of what the package does.
134
134
  :type summary: str
135
- :param classifiers: A JSON list containing classification values for a Python package.
135
+ :param classifiers:
136
136
  :type classifiers: object
137
137
  :param download_url: Legacy field denoting the URL from which this package can be downloaded.
138
138
  :type download_url: str
@@ -142,29 +142,29 @@ class ContentPackagesApi:
142
142
  :type maintainer: str
143
143
  :param maintainer_email: The maintainer's e-mail address.
144
144
  :type maintainer_email: str
145
- :param obsoletes_dist: A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.
145
+ :param obsoletes_dist:
146
146
  :type obsoletes_dist: object
147
147
  :param project_url: A browsable URL for the project and a label for it, separated by a comma.
148
148
  :type project_url: str
149
- :param project_urls: A dictionary of labels and URLs for the project.
149
+ :param project_urls:
150
150
  :type project_urls: object
151
- :param provides_dist: A JSON list containing names of a Distutils project which is contained within this distribution.
151
+ :param provides_dist:
152
152
  :type provides_dist: object
153
- :param requires_external: A JSON list containing some dependency in the system that the distribution is to be used.
153
+ :param requires_external:
154
154
  :type requires_external: object
155
- :param requires_dist: A JSON list containing names of some other distutils project required by this distribution.
155
+ :param requires_dist:
156
156
  :type requires_dist: object
157
157
  :param requires_python: The Python version(s) that the distribution is guaranteed to be compatible with.
158
158
  :type requires_python: str
159
- :param description_content_type: A string stating the markup syntax (if any) used in the distributions description, so that tools can intelligently render the description.
159
+ :param description_content_type: A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.
160
160
  :type description_content_type: str
161
- :param provides_extras: A JSON list containing names of optional features provided by the package.
161
+ :param provides_extras:
162
162
  :type provides_extras: object
163
- :param dynamic: A JSON list containing names of other core metadata fields which are permitted to vary between sdist and bdist packages. Fields NOT marked dynamic MUST be the same between bdist and sdist.
163
+ :param dynamic:
164
164
  :type dynamic: object
165
165
  :param license_expression: Text string that is a valid SPDX license expression.
166
166
  :type license_expression: str
167
- :param license_file: A JSON list containing names of the paths to license-related files.
167
+ :param license_file:
168
168
  :type license_file: object
169
169
  :param sha256: The SHA256 digest of this package.
170
170
  :type sha256: str
@@ -264,23 +264,23 @@ class ContentPackagesApi:
264
264
  license: Annotated[Optional[StrictStr], Field(description="Text indicating the license covering the distribution")] = None,
265
265
  platform: Annotated[Optional[StrictStr], Field(description="A comma-separated list of platform specifications, summarizing the operating systems supported by the package.")] = None,
266
266
  summary: Annotated[Optional[StrictStr], Field(description="A one-line summary of what the package does.")] = None,
267
- classifiers: Annotated[Optional[Any], Field(description="A JSON list containing classification values for a Python package.")] = None,
267
+ classifiers: Optional[Any] = None,
268
268
  download_url: Annotated[Optional[StrictStr], Field(description="Legacy field denoting the URL from which this package can be downloaded.")] = None,
269
269
  supported_platform: Annotated[Optional[StrictStr], Field(description="Field to specify the OS and CPU for which the binary package was compiled. ")] = None,
270
270
  maintainer: Annotated[Optional[StrictStr], Field(description="The maintainer's name at a minimum; additional contact information may be provided.")] = None,
271
271
  maintainer_email: Annotated[Optional[StrictStr], Field(description="The maintainer's e-mail address.")] = None,
272
- obsoletes_dist: Annotated[Optional[Any], Field(description="A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.")] = None,
272
+ obsoletes_dist: Optional[Any] = None,
273
273
  project_url: Annotated[Optional[StrictStr], Field(description="A browsable URL for the project and a label for it, separated by a comma.")] = None,
274
- project_urls: Annotated[Optional[Any], Field(description="A dictionary of labels and URLs for the project.")] = None,
275
- provides_dist: Annotated[Optional[Any], Field(description="A JSON list containing names of a Distutils project which is contained within this distribution.")] = None,
276
- requires_external: Annotated[Optional[Any], Field(description="A JSON list containing some dependency in the system that the distribution is to be used.")] = None,
277
- requires_dist: Annotated[Optional[Any], Field(description="A JSON list containing names of some other distutils project required by this distribution.")] = None,
274
+ project_urls: Optional[Any] = None,
275
+ provides_dist: Optional[Any] = None,
276
+ requires_external: Optional[Any] = None,
277
+ requires_dist: Optional[Any] = None,
278
278
  requires_python: Annotated[Optional[StrictStr], Field(description="The Python version(s) that the distribution is guaranteed to be compatible with.")] = None,
279
- description_content_type: Annotated[Optional[StrictStr], Field(description="A string stating the markup syntax (if any) used in the distributions description, so that tools can intelligently render the description.")] = None,
280
- provides_extras: Annotated[Optional[Any], Field(description="A JSON list containing names of optional features provided by the package.")] = None,
281
- dynamic: Annotated[Optional[Any], Field(description="A JSON list containing names of other core metadata fields which are permitted to vary between sdist and bdist packages. Fields NOT marked dynamic MUST be the same between bdist and sdist.")] = None,
279
+ description_content_type: Annotated[Optional[StrictStr], Field(description="A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.")] = None,
280
+ provides_extras: Optional[Any] = None,
281
+ dynamic: Optional[Any] = None,
282
282
  license_expression: Annotated[Optional[StrictStr], Field(description="Text string that is a valid SPDX license expression.")] = None,
283
- license_file: Annotated[Optional[Any], Field(description="A JSON list containing names of the paths to license-related files.")] = None,
283
+ license_file: Optional[Any] = None,
284
284
  sha256: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="The SHA256 digest of this package.")] = None,
285
285
  _request_timeout: Union[
286
286
  None,
@@ -331,7 +331,7 @@ class ContentPackagesApi:
331
331
  :type platform: str
332
332
  :param summary: A one-line summary of what the package does.
333
333
  :type summary: str
334
- :param classifiers: A JSON list containing classification values for a Python package.
334
+ :param classifiers:
335
335
  :type classifiers: object
336
336
  :param download_url: Legacy field denoting the URL from which this package can be downloaded.
337
337
  :type download_url: str
@@ -341,29 +341,29 @@ class ContentPackagesApi:
341
341
  :type maintainer: str
342
342
  :param maintainer_email: The maintainer's e-mail address.
343
343
  :type maintainer_email: str
344
- :param obsoletes_dist: A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.
344
+ :param obsoletes_dist:
345
345
  :type obsoletes_dist: object
346
346
  :param project_url: A browsable URL for the project and a label for it, separated by a comma.
347
347
  :type project_url: str
348
- :param project_urls: A dictionary of labels and URLs for the project.
348
+ :param project_urls:
349
349
  :type project_urls: object
350
- :param provides_dist: A JSON list containing names of a Distutils project which is contained within this distribution.
350
+ :param provides_dist:
351
351
  :type provides_dist: object
352
- :param requires_external: A JSON list containing some dependency in the system that the distribution is to be used.
352
+ :param requires_external:
353
353
  :type requires_external: object
354
- :param requires_dist: A JSON list containing names of some other distutils project required by this distribution.
354
+ :param requires_dist:
355
355
  :type requires_dist: object
356
356
  :param requires_python: The Python version(s) that the distribution is guaranteed to be compatible with.
357
357
  :type requires_python: str
358
- :param description_content_type: A string stating the markup syntax (if any) used in the distributions description, so that tools can intelligently render the description.
358
+ :param description_content_type: A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.
359
359
  :type description_content_type: str
360
- :param provides_extras: A JSON list containing names of optional features provided by the package.
360
+ :param provides_extras:
361
361
  :type provides_extras: object
362
- :param dynamic: A JSON list containing names of other core metadata fields which are permitted to vary between sdist and bdist packages. Fields NOT marked dynamic MUST be the same between bdist and sdist.
362
+ :param dynamic:
363
363
  :type dynamic: object
364
364
  :param license_expression: Text string that is a valid SPDX license expression.
365
365
  :type license_expression: str
366
- :param license_file: A JSON list containing names of the paths to license-related files.
366
+ :param license_file:
367
367
  :type license_file: object
368
368
  :param sha256: The SHA256 digest of this package.
369
369
  :type sha256: str
@@ -463,23 +463,23 @@ class ContentPackagesApi:
463
463
  license: Annotated[Optional[StrictStr], Field(description="Text indicating the license covering the distribution")] = None,
464
464
  platform: Annotated[Optional[StrictStr], Field(description="A comma-separated list of platform specifications, summarizing the operating systems supported by the package.")] = None,
465
465
  summary: Annotated[Optional[StrictStr], Field(description="A one-line summary of what the package does.")] = None,
466
- classifiers: Annotated[Optional[Any], Field(description="A JSON list containing classification values for a Python package.")] = None,
466
+ classifiers: Optional[Any] = None,
467
467
  download_url: Annotated[Optional[StrictStr], Field(description="Legacy field denoting the URL from which this package can be downloaded.")] = None,
468
468
  supported_platform: Annotated[Optional[StrictStr], Field(description="Field to specify the OS and CPU for which the binary package was compiled. ")] = None,
469
469
  maintainer: Annotated[Optional[StrictStr], Field(description="The maintainer's name at a minimum; additional contact information may be provided.")] = None,
470
470
  maintainer_email: Annotated[Optional[StrictStr], Field(description="The maintainer's e-mail address.")] = None,
471
- obsoletes_dist: Annotated[Optional[Any], Field(description="A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.")] = None,
471
+ obsoletes_dist: Optional[Any] = None,
472
472
  project_url: Annotated[Optional[StrictStr], Field(description="A browsable URL for the project and a label for it, separated by a comma.")] = None,
473
- project_urls: Annotated[Optional[Any], Field(description="A dictionary of labels and URLs for the project.")] = None,
474
- provides_dist: Annotated[Optional[Any], Field(description="A JSON list containing names of a Distutils project which is contained within this distribution.")] = None,
475
- requires_external: Annotated[Optional[Any], Field(description="A JSON list containing some dependency in the system that the distribution is to be used.")] = None,
476
- requires_dist: Annotated[Optional[Any], Field(description="A JSON list containing names of some other distutils project required by this distribution.")] = None,
473
+ project_urls: Optional[Any] = None,
474
+ provides_dist: Optional[Any] = None,
475
+ requires_external: Optional[Any] = None,
476
+ requires_dist: Optional[Any] = None,
477
477
  requires_python: Annotated[Optional[StrictStr], Field(description="The Python version(s) that the distribution is guaranteed to be compatible with.")] = None,
478
- description_content_type: Annotated[Optional[StrictStr], Field(description="A string stating the markup syntax (if any) used in the distributions description, so that tools can intelligently render the description.")] = None,
479
- provides_extras: Annotated[Optional[Any], Field(description="A JSON list containing names of optional features provided by the package.")] = None,
480
- dynamic: Annotated[Optional[Any], Field(description="A JSON list containing names of other core metadata fields which are permitted to vary between sdist and bdist packages. Fields NOT marked dynamic MUST be the same between bdist and sdist.")] = None,
478
+ description_content_type: Annotated[Optional[StrictStr], Field(description="A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.")] = None,
479
+ provides_extras: Optional[Any] = None,
480
+ dynamic: Optional[Any] = None,
481
481
  license_expression: Annotated[Optional[StrictStr], Field(description="Text string that is a valid SPDX license expression.")] = None,
482
- license_file: Annotated[Optional[Any], Field(description="A JSON list containing names of the paths to license-related files.")] = None,
482
+ license_file: Optional[Any] = None,
483
483
  sha256: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="The SHA256 digest of this package.")] = None,
484
484
  _request_timeout: Union[
485
485
  None,
@@ -530,7 +530,7 @@ class ContentPackagesApi:
530
530
  :type platform: str
531
531
  :param summary: A one-line summary of what the package does.
532
532
  :type summary: str
533
- :param classifiers: A JSON list containing classification values for a Python package.
533
+ :param classifiers:
534
534
  :type classifiers: object
535
535
  :param download_url: Legacy field denoting the URL from which this package can be downloaded.
536
536
  :type download_url: str
@@ -540,29 +540,29 @@ class ContentPackagesApi:
540
540
  :type maintainer: str
541
541
  :param maintainer_email: The maintainer's e-mail address.
542
542
  :type maintainer_email: str
543
- :param obsoletes_dist: A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.
543
+ :param obsoletes_dist:
544
544
  :type obsoletes_dist: object
545
545
  :param project_url: A browsable URL for the project and a label for it, separated by a comma.
546
546
  :type project_url: str
547
- :param project_urls: A dictionary of labels and URLs for the project.
547
+ :param project_urls:
548
548
  :type project_urls: object
549
- :param provides_dist: A JSON list containing names of a Distutils project which is contained within this distribution.
549
+ :param provides_dist:
550
550
  :type provides_dist: object
551
- :param requires_external: A JSON list containing some dependency in the system that the distribution is to be used.
551
+ :param requires_external:
552
552
  :type requires_external: object
553
- :param requires_dist: A JSON list containing names of some other distutils project required by this distribution.
553
+ :param requires_dist:
554
554
  :type requires_dist: object
555
555
  :param requires_python: The Python version(s) that the distribution is guaranteed to be compatible with.
556
556
  :type requires_python: str
557
- :param description_content_type: A string stating the markup syntax (if any) used in the distributions description, so that tools can intelligently render the description.
557
+ :param description_content_type: A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.
558
558
  :type description_content_type: str
559
- :param provides_extras: A JSON list containing names of optional features provided by the package.
559
+ :param provides_extras:
560
560
  :type provides_extras: object
561
- :param dynamic: A JSON list containing names of other core metadata fields which are permitted to vary between sdist and bdist packages. Fields NOT marked dynamic MUST be the same between bdist and sdist.
561
+ :param dynamic:
562
562
  :type dynamic: object
563
563
  :param license_expression: Text string that is a valid SPDX license expression.
564
564
  :type license_expression: str
565
- :param license_file: A JSON list containing names of the paths to license-related files.
565
+ :param license_file:
566
566
  :type license_file: object
567
567
  :param sha256: The SHA256 digest of this package.
568
568
  :type sha256: str
@@ -2617,3 +2617,745 @@ class ContentPackagesApi:
2617
2617
  )
2618
2618
 
2619
2619
 
2620
+
2621
+
2622
+ @validate_call
2623
+ def upload(
2624
+ self,
2625
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2626
+ pulp_labels: Annotated[Optional[Dict[str, Optional[StrictStr]]], Field(description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")] = None,
2627
+ artifact: Annotated[Optional[StrictStr], Field(description="Artifact file representing the physical content")] = None,
2628
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="An uploaded file that may be turned into the content unit.")] = None,
2629
+ upload: Annotated[Optional[StrictStr], Field(description="An uncommitted upload that may be turned into the content unit.")] = None,
2630
+ file_url: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="A url that Pulp can download and turn into the content unit.")] = None,
2631
+ author: Annotated[Optional[StrictStr], Field(description="Text containing the author's name. Contact information can also be added, separated with newlines.")] = None,
2632
+ author_email: Annotated[Optional[StrictStr], Field(description="The author's e-mail address. ")] = None,
2633
+ description: Annotated[Optional[StrictStr], Field(description="A longer description of the package that can run to several paragraphs.")] = None,
2634
+ home_page: Annotated[Optional[StrictStr], Field(description="The URL for the package's home page.")] = None,
2635
+ keywords: Annotated[Optional[StrictStr], Field(description="Additional keywords to be used to assist searching for the package in a larger catalog.")] = None,
2636
+ license: Annotated[Optional[StrictStr], Field(description="Text indicating the license covering the distribution")] = None,
2637
+ platform: Annotated[Optional[StrictStr], Field(description="A comma-separated list of platform specifications, summarizing the operating systems supported by the package.")] = None,
2638
+ summary: Annotated[Optional[StrictStr], Field(description="A one-line summary of what the package does.")] = None,
2639
+ classifiers: Optional[Any] = None,
2640
+ download_url: Annotated[Optional[StrictStr], Field(description="Legacy field denoting the URL from which this package can be downloaded.")] = None,
2641
+ supported_platform: Annotated[Optional[StrictStr], Field(description="Field to specify the OS and CPU for which the binary package was compiled. ")] = None,
2642
+ maintainer: Annotated[Optional[StrictStr], Field(description="The maintainer's name at a minimum; additional contact information may be provided.")] = None,
2643
+ maintainer_email: Annotated[Optional[StrictStr], Field(description="The maintainer's e-mail address.")] = None,
2644
+ obsoletes_dist: Optional[Any] = None,
2645
+ project_url: Annotated[Optional[StrictStr], Field(description="A browsable URL for the project and a label for it, separated by a comma.")] = None,
2646
+ project_urls: Optional[Any] = None,
2647
+ provides_dist: Optional[Any] = None,
2648
+ requires_external: Optional[Any] = None,
2649
+ requires_dist: Optional[Any] = None,
2650
+ requires_python: Annotated[Optional[StrictStr], Field(description="The Python version(s) that the distribution is guaranteed to be compatible with.")] = None,
2651
+ description_content_type: Annotated[Optional[StrictStr], Field(description="A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.")] = None,
2652
+ provides_extras: Optional[Any] = None,
2653
+ dynamic: Optional[Any] = None,
2654
+ license_expression: Annotated[Optional[StrictStr], Field(description="Text string that is a valid SPDX license expression.")] = None,
2655
+ license_file: Optional[Any] = None,
2656
+ sha256: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="The SHA256 digest of this package.")] = None,
2657
+ _request_timeout: Union[
2658
+ None,
2659
+ Annotated[StrictFloat, Field(gt=0)],
2660
+ Tuple[
2661
+ Annotated[StrictFloat, Field(gt=0)],
2662
+ Annotated[StrictFloat, Field(gt=0)]
2663
+ ]
2664
+ ] = None,
2665
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2666
+ _content_type: Optional[StrictStr] = None,
2667
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2668
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2669
+ ) -> PythonPythonPackageContentResponse:
2670
+ """Synchronous Python package upload
2671
+
2672
+ Create a Python package.
2673
+
2674
+ :param x_task_diagnostics: List of profilers to use on tasks.
2675
+ :type x_task_diagnostics: List[str]
2676
+ :param pulp_labels: A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
2677
+ :type pulp_labels: Dict[str, Optional[str]]
2678
+ :param artifact: Artifact file representing the physical content
2679
+ :type artifact: str
2680
+ :param file: An uploaded file that may be turned into the content unit.
2681
+ :type file: bytearray
2682
+ :param upload: An uncommitted upload that may be turned into the content unit.
2683
+ :type upload: str
2684
+ :param file_url: A url that Pulp can download and turn into the content unit.
2685
+ :type file_url: str
2686
+ :param author: Text containing the author's name. Contact information can also be added, separated with newlines.
2687
+ :type author: str
2688
+ :param author_email: The author's e-mail address.
2689
+ :type author_email: str
2690
+ :param description: A longer description of the package that can run to several paragraphs.
2691
+ :type description: str
2692
+ :param home_page: The URL for the package's home page.
2693
+ :type home_page: str
2694
+ :param keywords: Additional keywords to be used to assist searching for the package in a larger catalog.
2695
+ :type keywords: str
2696
+ :param license: Text indicating the license covering the distribution
2697
+ :type license: str
2698
+ :param platform: A comma-separated list of platform specifications, summarizing the operating systems supported by the package.
2699
+ :type platform: str
2700
+ :param summary: A one-line summary of what the package does.
2701
+ :type summary: str
2702
+ :param classifiers:
2703
+ :type classifiers: object
2704
+ :param download_url: Legacy field denoting the URL from which this package can be downloaded.
2705
+ :type download_url: str
2706
+ :param supported_platform: Field to specify the OS and CPU for which the binary package was compiled.
2707
+ :type supported_platform: str
2708
+ :param maintainer: The maintainer's name at a minimum; additional contact information may be provided.
2709
+ :type maintainer: str
2710
+ :param maintainer_email: The maintainer's e-mail address.
2711
+ :type maintainer_email: str
2712
+ :param obsoletes_dist:
2713
+ :type obsoletes_dist: object
2714
+ :param project_url: A browsable URL for the project and a label for it, separated by a comma.
2715
+ :type project_url: str
2716
+ :param project_urls:
2717
+ :type project_urls: object
2718
+ :param provides_dist:
2719
+ :type provides_dist: object
2720
+ :param requires_external:
2721
+ :type requires_external: object
2722
+ :param requires_dist:
2723
+ :type requires_dist: object
2724
+ :param requires_python: The Python version(s) that the distribution is guaranteed to be compatible with.
2725
+ :type requires_python: str
2726
+ :param description_content_type: A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.
2727
+ :type description_content_type: str
2728
+ :param provides_extras:
2729
+ :type provides_extras: object
2730
+ :param dynamic:
2731
+ :type dynamic: object
2732
+ :param license_expression: Text string that is a valid SPDX license expression.
2733
+ :type license_expression: str
2734
+ :param license_file:
2735
+ :type license_file: object
2736
+ :param sha256: The SHA256 digest of this package.
2737
+ :type sha256: str
2738
+ :param _request_timeout: timeout setting for this request. If one
2739
+ number provided, it will be total request
2740
+ timeout. It can also be a pair (tuple) of
2741
+ (connection, read) timeouts.
2742
+ :type _request_timeout: int, tuple(int, int), optional
2743
+ :param _request_auth: set to override the auth_settings for an a single
2744
+ request; this effectively ignores the
2745
+ authentication in the spec for a single request.
2746
+ :type _request_auth: dict, optional
2747
+ :param _content_type: force content-type for the request.
2748
+ :type _content_type: str, Optional
2749
+ :param _headers: set to override the headers for a single
2750
+ request; this effectively ignores the headers
2751
+ in the spec for a single request.
2752
+ :type _headers: dict, optional
2753
+ :param _host_index: set to override the host_index for a single
2754
+ request; this effectively ignores the host_index
2755
+ in the spec for a single request.
2756
+ :type _host_index: int, optional
2757
+ :return: Returns the result object.
2758
+ """ # noqa: E501
2759
+
2760
+ _param = self._upload_serialize(
2761
+ x_task_diagnostics=x_task_diagnostics,
2762
+ pulp_labels=pulp_labels,
2763
+ artifact=artifact,
2764
+ file=file,
2765
+ upload=upload,
2766
+ file_url=file_url,
2767
+ author=author,
2768
+ author_email=author_email,
2769
+ description=description,
2770
+ home_page=home_page,
2771
+ keywords=keywords,
2772
+ license=license,
2773
+ platform=platform,
2774
+ summary=summary,
2775
+ classifiers=classifiers,
2776
+ download_url=download_url,
2777
+ supported_platform=supported_platform,
2778
+ maintainer=maintainer,
2779
+ maintainer_email=maintainer_email,
2780
+ obsoletes_dist=obsoletes_dist,
2781
+ project_url=project_url,
2782
+ project_urls=project_urls,
2783
+ provides_dist=provides_dist,
2784
+ requires_external=requires_external,
2785
+ requires_dist=requires_dist,
2786
+ requires_python=requires_python,
2787
+ description_content_type=description_content_type,
2788
+ provides_extras=provides_extras,
2789
+ dynamic=dynamic,
2790
+ license_expression=license_expression,
2791
+ license_file=license_file,
2792
+ sha256=sha256,
2793
+ _request_auth=_request_auth,
2794
+ _content_type=_content_type,
2795
+ _headers=_headers,
2796
+ _host_index=_host_index
2797
+ )
2798
+
2799
+ _response_types_map: Dict[str, Optional[str]] = {
2800
+ '201': "PythonPythonPackageContentResponse",
2801
+ }
2802
+ response_data = self.api_client.call_api(
2803
+ *_param,
2804
+ _request_timeout=_request_timeout
2805
+ )
2806
+ response_data.read()
2807
+ return self.api_client.response_deserialize(
2808
+ response_data=response_data,
2809
+ response_types_map=_response_types_map,
2810
+ ).data
2811
+
2812
+
2813
+ @validate_call
2814
+ def upload_with_http_info(
2815
+ self,
2816
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2817
+ pulp_labels: Annotated[Optional[Dict[str, Optional[StrictStr]]], Field(description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")] = None,
2818
+ artifact: Annotated[Optional[StrictStr], Field(description="Artifact file representing the physical content")] = None,
2819
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="An uploaded file that may be turned into the content unit.")] = None,
2820
+ upload: Annotated[Optional[StrictStr], Field(description="An uncommitted upload that may be turned into the content unit.")] = None,
2821
+ file_url: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="A url that Pulp can download and turn into the content unit.")] = None,
2822
+ author: Annotated[Optional[StrictStr], Field(description="Text containing the author's name. Contact information can also be added, separated with newlines.")] = None,
2823
+ author_email: Annotated[Optional[StrictStr], Field(description="The author's e-mail address. ")] = None,
2824
+ description: Annotated[Optional[StrictStr], Field(description="A longer description of the package that can run to several paragraphs.")] = None,
2825
+ home_page: Annotated[Optional[StrictStr], Field(description="The URL for the package's home page.")] = None,
2826
+ keywords: Annotated[Optional[StrictStr], Field(description="Additional keywords to be used to assist searching for the package in a larger catalog.")] = None,
2827
+ license: Annotated[Optional[StrictStr], Field(description="Text indicating the license covering the distribution")] = None,
2828
+ platform: Annotated[Optional[StrictStr], Field(description="A comma-separated list of platform specifications, summarizing the operating systems supported by the package.")] = None,
2829
+ summary: Annotated[Optional[StrictStr], Field(description="A one-line summary of what the package does.")] = None,
2830
+ classifiers: Optional[Any] = None,
2831
+ download_url: Annotated[Optional[StrictStr], Field(description="Legacy field denoting the URL from which this package can be downloaded.")] = None,
2832
+ supported_platform: Annotated[Optional[StrictStr], Field(description="Field to specify the OS and CPU for which the binary package was compiled. ")] = None,
2833
+ maintainer: Annotated[Optional[StrictStr], Field(description="The maintainer's name at a minimum; additional contact information may be provided.")] = None,
2834
+ maintainer_email: Annotated[Optional[StrictStr], Field(description="The maintainer's e-mail address.")] = None,
2835
+ obsoletes_dist: Optional[Any] = None,
2836
+ project_url: Annotated[Optional[StrictStr], Field(description="A browsable URL for the project and a label for it, separated by a comma.")] = None,
2837
+ project_urls: Optional[Any] = None,
2838
+ provides_dist: Optional[Any] = None,
2839
+ requires_external: Optional[Any] = None,
2840
+ requires_dist: Optional[Any] = None,
2841
+ requires_python: Annotated[Optional[StrictStr], Field(description="The Python version(s) that the distribution is guaranteed to be compatible with.")] = None,
2842
+ description_content_type: Annotated[Optional[StrictStr], Field(description="A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.")] = None,
2843
+ provides_extras: Optional[Any] = None,
2844
+ dynamic: Optional[Any] = None,
2845
+ license_expression: Annotated[Optional[StrictStr], Field(description="Text string that is a valid SPDX license expression.")] = None,
2846
+ license_file: Optional[Any] = None,
2847
+ sha256: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="The SHA256 digest of this package.")] = None,
2848
+ _request_timeout: Union[
2849
+ None,
2850
+ Annotated[StrictFloat, Field(gt=0)],
2851
+ Tuple[
2852
+ Annotated[StrictFloat, Field(gt=0)],
2853
+ Annotated[StrictFloat, Field(gt=0)]
2854
+ ]
2855
+ ] = None,
2856
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2857
+ _content_type: Optional[StrictStr] = None,
2858
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2859
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2860
+ ) -> ApiResponse[PythonPythonPackageContentResponse]:
2861
+ """Synchronous Python package upload
2862
+
2863
+ Create a Python package.
2864
+
2865
+ :param x_task_diagnostics: List of profilers to use on tasks.
2866
+ :type x_task_diagnostics: List[str]
2867
+ :param pulp_labels: A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
2868
+ :type pulp_labels: Dict[str, Optional[str]]
2869
+ :param artifact: Artifact file representing the physical content
2870
+ :type artifact: str
2871
+ :param file: An uploaded file that may be turned into the content unit.
2872
+ :type file: bytearray
2873
+ :param upload: An uncommitted upload that may be turned into the content unit.
2874
+ :type upload: str
2875
+ :param file_url: A url that Pulp can download and turn into the content unit.
2876
+ :type file_url: str
2877
+ :param author: Text containing the author's name. Contact information can also be added, separated with newlines.
2878
+ :type author: str
2879
+ :param author_email: The author's e-mail address.
2880
+ :type author_email: str
2881
+ :param description: A longer description of the package that can run to several paragraphs.
2882
+ :type description: str
2883
+ :param home_page: The URL for the package's home page.
2884
+ :type home_page: str
2885
+ :param keywords: Additional keywords to be used to assist searching for the package in a larger catalog.
2886
+ :type keywords: str
2887
+ :param license: Text indicating the license covering the distribution
2888
+ :type license: str
2889
+ :param platform: A comma-separated list of platform specifications, summarizing the operating systems supported by the package.
2890
+ :type platform: str
2891
+ :param summary: A one-line summary of what the package does.
2892
+ :type summary: str
2893
+ :param classifiers:
2894
+ :type classifiers: object
2895
+ :param download_url: Legacy field denoting the URL from which this package can be downloaded.
2896
+ :type download_url: str
2897
+ :param supported_platform: Field to specify the OS and CPU for which the binary package was compiled.
2898
+ :type supported_platform: str
2899
+ :param maintainer: The maintainer's name at a minimum; additional contact information may be provided.
2900
+ :type maintainer: str
2901
+ :param maintainer_email: The maintainer's e-mail address.
2902
+ :type maintainer_email: str
2903
+ :param obsoletes_dist:
2904
+ :type obsoletes_dist: object
2905
+ :param project_url: A browsable URL for the project and a label for it, separated by a comma.
2906
+ :type project_url: str
2907
+ :param project_urls:
2908
+ :type project_urls: object
2909
+ :param provides_dist:
2910
+ :type provides_dist: object
2911
+ :param requires_external:
2912
+ :type requires_external: object
2913
+ :param requires_dist:
2914
+ :type requires_dist: object
2915
+ :param requires_python: The Python version(s) that the distribution is guaranteed to be compatible with.
2916
+ :type requires_python: str
2917
+ :param description_content_type: A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.
2918
+ :type description_content_type: str
2919
+ :param provides_extras:
2920
+ :type provides_extras: object
2921
+ :param dynamic:
2922
+ :type dynamic: object
2923
+ :param license_expression: Text string that is a valid SPDX license expression.
2924
+ :type license_expression: str
2925
+ :param license_file:
2926
+ :type license_file: object
2927
+ :param sha256: The SHA256 digest of this package.
2928
+ :type sha256: str
2929
+ :param _request_timeout: timeout setting for this request. If one
2930
+ number provided, it will be total request
2931
+ timeout. It can also be a pair (tuple) of
2932
+ (connection, read) timeouts.
2933
+ :type _request_timeout: int, tuple(int, int), optional
2934
+ :param _request_auth: set to override the auth_settings for an a single
2935
+ request; this effectively ignores the
2936
+ authentication in the spec for a single request.
2937
+ :type _request_auth: dict, optional
2938
+ :param _content_type: force content-type for the request.
2939
+ :type _content_type: str, Optional
2940
+ :param _headers: set to override the headers for a single
2941
+ request; this effectively ignores the headers
2942
+ in the spec for a single request.
2943
+ :type _headers: dict, optional
2944
+ :param _host_index: set to override the host_index for a single
2945
+ request; this effectively ignores the host_index
2946
+ in the spec for a single request.
2947
+ :type _host_index: int, optional
2948
+ :return: Returns the result object.
2949
+ """ # noqa: E501
2950
+
2951
+ _param = self._upload_serialize(
2952
+ x_task_diagnostics=x_task_diagnostics,
2953
+ pulp_labels=pulp_labels,
2954
+ artifact=artifact,
2955
+ file=file,
2956
+ upload=upload,
2957
+ file_url=file_url,
2958
+ author=author,
2959
+ author_email=author_email,
2960
+ description=description,
2961
+ home_page=home_page,
2962
+ keywords=keywords,
2963
+ license=license,
2964
+ platform=platform,
2965
+ summary=summary,
2966
+ classifiers=classifiers,
2967
+ download_url=download_url,
2968
+ supported_platform=supported_platform,
2969
+ maintainer=maintainer,
2970
+ maintainer_email=maintainer_email,
2971
+ obsoletes_dist=obsoletes_dist,
2972
+ project_url=project_url,
2973
+ project_urls=project_urls,
2974
+ provides_dist=provides_dist,
2975
+ requires_external=requires_external,
2976
+ requires_dist=requires_dist,
2977
+ requires_python=requires_python,
2978
+ description_content_type=description_content_type,
2979
+ provides_extras=provides_extras,
2980
+ dynamic=dynamic,
2981
+ license_expression=license_expression,
2982
+ license_file=license_file,
2983
+ sha256=sha256,
2984
+ _request_auth=_request_auth,
2985
+ _content_type=_content_type,
2986
+ _headers=_headers,
2987
+ _host_index=_host_index
2988
+ )
2989
+
2990
+ _response_types_map: Dict[str, Optional[str]] = {
2991
+ '201': "PythonPythonPackageContentResponse",
2992
+ }
2993
+ response_data = self.api_client.call_api(
2994
+ *_param,
2995
+ _request_timeout=_request_timeout
2996
+ )
2997
+ response_data.read()
2998
+ return self.api_client.response_deserialize(
2999
+ response_data=response_data,
3000
+ response_types_map=_response_types_map,
3001
+ )
3002
+
3003
+
3004
+ @validate_call
3005
+ def upload_without_preload_content(
3006
+ self,
3007
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3008
+ pulp_labels: Annotated[Optional[Dict[str, Optional[StrictStr]]], Field(description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")] = None,
3009
+ artifact: Annotated[Optional[StrictStr], Field(description="Artifact file representing the physical content")] = None,
3010
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="An uploaded file that may be turned into the content unit.")] = None,
3011
+ upload: Annotated[Optional[StrictStr], Field(description="An uncommitted upload that may be turned into the content unit.")] = None,
3012
+ file_url: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="A url that Pulp can download and turn into the content unit.")] = None,
3013
+ author: Annotated[Optional[StrictStr], Field(description="Text containing the author's name. Contact information can also be added, separated with newlines.")] = None,
3014
+ author_email: Annotated[Optional[StrictStr], Field(description="The author's e-mail address. ")] = None,
3015
+ description: Annotated[Optional[StrictStr], Field(description="A longer description of the package that can run to several paragraphs.")] = None,
3016
+ home_page: Annotated[Optional[StrictStr], Field(description="The URL for the package's home page.")] = None,
3017
+ keywords: Annotated[Optional[StrictStr], Field(description="Additional keywords to be used to assist searching for the package in a larger catalog.")] = None,
3018
+ license: Annotated[Optional[StrictStr], Field(description="Text indicating the license covering the distribution")] = None,
3019
+ platform: Annotated[Optional[StrictStr], Field(description="A comma-separated list of platform specifications, summarizing the operating systems supported by the package.")] = None,
3020
+ summary: Annotated[Optional[StrictStr], Field(description="A one-line summary of what the package does.")] = None,
3021
+ classifiers: Optional[Any] = None,
3022
+ download_url: Annotated[Optional[StrictStr], Field(description="Legacy field denoting the URL from which this package can be downloaded.")] = None,
3023
+ supported_platform: Annotated[Optional[StrictStr], Field(description="Field to specify the OS and CPU for which the binary package was compiled. ")] = None,
3024
+ maintainer: Annotated[Optional[StrictStr], Field(description="The maintainer's name at a minimum; additional contact information may be provided.")] = None,
3025
+ maintainer_email: Annotated[Optional[StrictStr], Field(description="The maintainer's e-mail address.")] = None,
3026
+ obsoletes_dist: Optional[Any] = None,
3027
+ project_url: Annotated[Optional[StrictStr], Field(description="A browsable URL for the project and a label for it, separated by a comma.")] = None,
3028
+ project_urls: Optional[Any] = None,
3029
+ provides_dist: Optional[Any] = None,
3030
+ requires_external: Optional[Any] = None,
3031
+ requires_dist: Optional[Any] = None,
3032
+ requires_python: Annotated[Optional[StrictStr], Field(description="The Python version(s) that the distribution is guaranteed to be compatible with.")] = None,
3033
+ description_content_type: Annotated[Optional[StrictStr], Field(description="A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.")] = None,
3034
+ provides_extras: Optional[Any] = None,
3035
+ dynamic: Optional[Any] = None,
3036
+ license_expression: Annotated[Optional[StrictStr], Field(description="Text string that is a valid SPDX license expression.")] = None,
3037
+ license_file: Optional[Any] = None,
3038
+ sha256: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="The SHA256 digest of this package.")] = None,
3039
+ _request_timeout: Union[
3040
+ None,
3041
+ Annotated[StrictFloat, Field(gt=0)],
3042
+ Tuple[
3043
+ Annotated[StrictFloat, Field(gt=0)],
3044
+ Annotated[StrictFloat, Field(gt=0)]
3045
+ ]
3046
+ ] = None,
3047
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3048
+ _content_type: Optional[StrictStr] = None,
3049
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3050
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3051
+ ) -> RESTResponseType:
3052
+ """Synchronous Python package upload
3053
+
3054
+ Create a Python package.
3055
+
3056
+ :param x_task_diagnostics: List of profilers to use on tasks.
3057
+ :type x_task_diagnostics: List[str]
3058
+ :param pulp_labels: A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
3059
+ :type pulp_labels: Dict[str, Optional[str]]
3060
+ :param artifact: Artifact file representing the physical content
3061
+ :type artifact: str
3062
+ :param file: An uploaded file that may be turned into the content unit.
3063
+ :type file: bytearray
3064
+ :param upload: An uncommitted upload that may be turned into the content unit.
3065
+ :type upload: str
3066
+ :param file_url: A url that Pulp can download and turn into the content unit.
3067
+ :type file_url: str
3068
+ :param author: Text containing the author's name. Contact information can also be added, separated with newlines.
3069
+ :type author: str
3070
+ :param author_email: The author's e-mail address.
3071
+ :type author_email: str
3072
+ :param description: A longer description of the package that can run to several paragraphs.
3073
+ :type description: str
3074
+ :param home_page: The URL for the package's home page.
3075
+ :type home_page: str
3076
+ :param keywords: Additional keywords to be used to assist searching for the package in a larger catalog.
3077
+ :type keywords: str
3078
+ :param license: Text indicating the license covering the distribution
3079
+ :type license: str
3080
+ :param platform: A comma-separated list of platform specifications, summarizing the operating systems supported by the package.
3081
+ :type platform: str
3082
+ :param summary: A one-line summary of what the package does.
3083
+ :type summary: str
3084
+ :param classifiers:
3085
+ :type classifiers: object
3086
+ :param download_url: Legacy field denoting the URL from which this package can be downloaded.
3087
+ :type download_url: str
3088
+ :param supported_platform: Field to specify the OS and CPU for which the binary package was compiled.
3089
+ :type supported_platform: str
3090
+ :param maintainer: The maintainer's name at a minimum; additional contact information may be provided.
3091
+ :type maintainer: str
3092
+ :param maintainer_email: The maintainer's e-mail address.
3093
+ :type maintainer_email: str
3094
+ :param obsoletes_dist:
3095
+ :type obsoletes_dist: object
3096
+ :param project_url: A browsable URL for the project and a label for it, separated by a comma.
3097
+ :type project_url: str
3098
+ :param project_urls:
3099
+ :type project_urls: object
3100
+ :param provides_dist:
3101
+ :type provides_dist: object
3102
+ :param requires_external:
3103
+ :type requires_external: object
3104
+ :param requires_dist:
3105
+ :type requires_dist: object
3106
+ :param requires_python: The Python version(s) that the distribution is guaranteed to be compatible with.
3107
+ :type requires_python: str
3108
+ :param description_content_type: A string stating the markup syntax (if any) used in the distribution's description, so that tools can intelligently render the description.
3109
+ :type description_content_type: str
3110
+ :param provides_extras:
3111
+ :type provides_extras: object
3112
+ :param dynamic:
3113
+ :type dynamic: object
3114
+ :param license_expression: Text string that is a valid SPDX license expression.
3115
+ :type license_expression: str
3116
+ :param license_file:
3117
+ :type license_file: object
3118
+ :param sha256: The SHA256 digest of this package.
3119
+ :type sha256: str
3120
+ :param _request_timeout: timeout setting for this request. If one
3121
+ number provided, it will be total request
3122
+ timeout. It can also be a pair (tuple) of
3123
+ (connection, read) timeouts.
3124
+ :type _request_timeout: int, tuple(int, int), optional
3125
+ :param _request_auth: set to override the auth_settings for an a single
3126
+ request; this effectively ignores the
3127
+ authentication in the spec for a single request.
3128
+ :type _request_auth: dict, optional
3129
+ :param _content_type: force content-type for the request.
3130
+ :type _content_type: str, Optional
3131
+ :param _headers: set to override the headers for a single
3132
+ request; this effectively ignores the headers
3133
+ in the spec for a single request.
3134
+ :type _headers: dict, optional
3135
+ :param _host_index: set to override the host_index for a single
3136
+ request; this effectively ignores the host_index
3137
+ in the spec for a single request.
3138
+ :type _host_index: int, optional
3139
+ :return: Returns the result object.
3140
+ """ # noqa: E501
3141
+
3142
+ _param = self._upload_serialize(
3143
+ x_task_diagnostics=x_task_diagnostics,
3144
+ pulp_labels=pulp_labels,
3145
+ artifact=artifact,
3146
+ file=file,
3147
+ upload=upload,
3148
+ file_url=file_url,
3149
+ author=author,
3150
+ author_email=author_email,
3151
+ description=description,
3152
+ home_page=home_page,
3153
+ keywords=keywords,
3154
+ license=license,
3155
+ platform=platform,
3156
+ summary=summary,
3157
+ classifiers=classifiers,
3158
+ download_url=download_url,
3159
+ supported_platform=supported_platform,
3160
+ maintainer=maintainer,
3161
+ maintainer_email=maintainer_email,
3162
+ obsoletes_dist=obsoletes_dist,
3163
+ project_url=project_url,
3164
+ project_urls=project_urls,
3165
+ provides_dist=provides_dist,
3166
+ requires_external=requires_external,
3167
+ requires_dist=requires_dist,
3168
+ requires_python=requires_python,
3169
+ description_content_type=description_content_type,
3170
+ provides_extras=provides_extras,
3171
+ dynamic=dynamic,
3172
+ license_expression=license_expression,
3173
+ license_file=license_file,
3174
+ sha256=sha256,
3175
+ _request_auth=_request_auth,
3176
+ _content_type=_content_type,
3177
+ _headers=_headers,
3178
+ _host_index=_host_index
3179
+ )
3180
+
3181
+ _response_types_map: Dict[str, Optional[str]] = {
3182
+ '201': "PythonPythonPackageContentResponse",
3183
+ }
3184
+ response_data = self.api_client.call_api(
3185
+ *_param,
3186
+ _request_timeout=_request_timeout
3187
+ )
3188
+ return response_data.response
3189
+
3190
+
3191
+ def _upload_serialize(
3192
+ self,
3193
+ x_task_diagnostics,
3194
+ pulp_labels,
3195
+ artifact,
3196
+ file,
3197
+ upload,
3198
+ file_url,
3199
+ author,
3200
+ author_email,
3201
+ description,
3202
+ home_page,
3203
+ keywords,
3204
+ license,
3205
+ platform,
3206
+ summary,
3207
+ classifiers,
3208
+ download_url,
3209
+ supported_platform,
3210
+ maintainer,
3211
+ maintainer_email,
3212
+ obsoletes_dist,
3213
+ project_url,
3214
+ project_urls,
3215
+ provides_dist,
3216
+ requires_external,
3217
+ requires_dist,
3218
+ requires_python,
3219
+ description_content_type,
3220
+ provides_extras,
3221
+ dynamic,
3222
+ license_expression,
3223
+ license_file,
3224
+ sha256,
3225
+ _request_auth,
3226
+ _content_type,
3227
+ _headers,
3228
+ _host_index,
3229
+ ) -> RequestSerialized:
3230
+
3231
+ _host = None
3232
+
3233
+ _collection_formats: Dict[str, str] = {
3234
+ 'X-Task-Diagnostics': 'csv',
3235
+ }
3236
+
3237
+ _path_params: Dict[str, str] = {}
3238
+ _query_params: List[Tuple[str, str]] = []
3239
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3240
+ _form_params: List[Tuple[str, str]] = []
3241
+ _files: Dict[
3242
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3243
+ ] = {}
3244
+ _body_params: Optional[bytes] = None
3245
+
3246
+ # process the path parameters
3247
+ # process the query parameters
3248
+ # process the header parameters
3249
+ if x_task_diagnostics is not None:
3250
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3251
+ # process the form parameters
3252
+ if pulp_labels is not None:
3253
+ _form_params.append(('pulp_labels', pulp_labels))
3254
+ if artifact is not None:
3255
+ _form_params.append(('artifact', artifact))
3256
+ if file is not None:
3257
+ _files['file'] = file
3258
+ if upload is not None:
3259
+ _form_params.append(('upload', upload))
3260
+ if file_url is not None:
3261
+ _form_params.append(('file_url', file_url))
3262
+ if author is not None:
3263
+ _form_params.append(('author', author))
3264
+ if author_email is not None:
3265
+ _form_params.append(('author_email', author_email))
3266
+ if description is not None:
3267
+ _form_params.append(('description', description))
3268
+ if home_page is not None:
3269
+ _form_params.append(('home_page', home_page))
3270
+ if keywords is not None:
3271
+ _form_params.append(('keywords', keywords))
3272
+ if license is not None:
3273
+ _form_params.append(('license', license))
3274
+ if platform is not None:
3275
+ _form_params.append(('platform', platform))
3276
+ if summary is not None:
3277
+ _form_params.append(('summary', summary))
3278
+ if classifiers is not None:
3279
+ _form_params.append(('classifiers', classifiers))
3280
+ if download_url is not None:
3281
+ _form_params.append(('download_url', download_url))
3282
+ if supported_platform is not None:
3283
+ _form_params.append(('supported_platform', supported_platform))
3284
+ if maintainer is not None:
3285
+ _form_params.append(('maintainer', maintainer))
3286
+ if maintainer_email is not None:
3287
+ _form_params.append(('maintainer_email', maintainer_email))
3288
+ if obsoletes_dist is not None:
3289
+ _form_params.append(('obsoletes_dist', obsoletes_dist))
3290
+ if project_url is not None:
3291
+ _form_params.append(('project_url', project_url))
3292
+ if project_urls is not None:
3293
+ _form_params.append(('project_urls', project_urls))
3294
+ if provides_dist is not None:
3295
+ _form_params.append(('provides_dist', provides_dist))
3296
+ if requires_external is not None:
3297
+ _form_params.append(('requires_external', requires_external))
3298
+ if requires_dist is not None:
3299
+ _form_params.append(('requires_dist', requires_dist))
3300
+ if requires_python is not None:
3301
+ _form_params.append(('requires_python', requires_python))
3302
+ if description_content_type is not None:
3303
+ _form_params.append(('description_content_type', description_content_type))
3304
+ if provides_extras is not None:
3305
+ _form_params.append(('provides_extras', provides_extras))
3306
+ if dynamic is not None:
3307
+ _form_params.append(('dynamic', dynamic))
3308
+ if license_expression is not None:
3309
+ _form_params.append(('license_expression', license_expression))
3310
+ if license_file is not None:
3311
+ _form_params.append(('license_file', license_file))
3312
+ if sha256 is not None:
3313
+ _form_params.append(('sha256', sha256))
3314
+ # process the body parameter
3315
+
3316
+
3317
+ # set the HTTP header `Accept`
3318
+ if 'Accept' not in _header_params:
3319
+ _header_params['Accept'] = self.api_client.select_header_accept(
3320
+ [
3321
+ 'application/json'
3322
+ ]
3323
+ )
3324
+
3325
+ # set the HTTP header `Content-Type`
3326
+ if _content_type:
3327
+ _header_params['Content-Type'] = _content_type
3328
+ else:
3329
+ _default_content_type = (
3330
+ self.api_client.select_header_content_type(
3331
+ [
3332
+ 'multipart/form-data',
3333
+ 'application/x-www-form-urlencoded'
3334
+ ]
3335
+ )
3336
+ )
3337
+ if _default_content_type is not None:
3338
+ _header_params['Content-Type'] = _default_content_type
3339
+
3340
+ # authentication setting
3341
+ _auth_settings: List[str] = [
3342
+ 'basicAuth',
3343
+ 'cookieAuth'
3344
+ ]
3345
+
3346
+ return self.api_client.param_serialize(
3347
+ method='POST',
3348
+ resource_path='/pulp/api/v3/content/python/packages/upload/',
3349
+ path_params=_path_params,
3350
+ query_params=_query_params,
3351
+ header_params=_header_params,
3352
+ body=_body_params,
3353
+ post_params=_form_params,
3354
+ files=_files,
3355
+ auth_settings=_auth_settings,
3356
+ collection_formats=_collection_formats,
3357
+ _host=_host,
3358
+ _request_auth=_request_auth
3359
+ )
3360
+
3361
+