wasm-action 0.0.1__tar.gz

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.
Files changed (70) hide show
  1. wasm_action-0.0.1/PKG-INFO +53 -0
  2. wasm_action-0.0.1/README.md +36 -0
  3. wasm_action-0.0.1/pyproject.toml +28 -0
  4. wasm_action-0.0.1/src/warg_openapi/__init__.py +145 -0
  5. wasm_action-0.0.1/src/warg_openapi/api/__init__.py +10 -0
  6. wasm_action-0.0.1/src/warg_openapi/api/content_api.py +195 -0
  7. wasm_action-0.0.1/src/warg_openapi/api/fetch_api.py +502 -0
  8. wasm_action-0.0.1/src/warg_openapi/api/ledger_api.py +186 -0
  9. wasm_action-0.0.1/src/warg_openapi/api/monitor_api.py +202 -0
  10. wasm_action-0.0.1/src/warg_openapi/api/package_api.py +372 -0
  11. wasm_action-0.0.1/src/warg_openapi/api/proof_api.py +363 -0
  12. wasm_action-0.0.1/src/warg_openapi/api_client.py +766 -0
  13. wasm_action-0.0.1/src/warg_openapi/api_response.py +25 -0
  14. wasm_action-0.0.1/src/warg_openapi/configuration.py +434 -0
  15. wasm_action-0.0.1/src/warg_openapi/exceptions.py +166 -0
  16. wasm_action-0.0.1/src/warg_openapi/models/__init__.py +60 -0
  17. wasm_action-0.0.1/src/warg_openapi/models/bundle_failure_error.py +82 -0
  18. wasm_action-0.0.1/src/warg_openapi/models/checkpoint.py +89 -0
  19. wasm_action-0.0.1/src/warg_openapi/models/checkpoint_verification_response.py +89 -0
  20. wasm_action-0.0.1/src/warg_openapi/models/content_sources_response.py +71 -0
  21. wasm_action-0.0.1/src/warg_openapi/models/envelope_body.py +89 -0
  22. wasm_action-0.0.1/src/warg_openapi/models/error.py +73 -0
  23. wasm_action-0.0.1/src/warg_openapi/models/fetch_logs404_response.py +141 -0
  24. wasm_action-0.0.1/src/warg_openapi/models/fetch_logs_id_not_found_error.py +82 -0
  25. wasm_action-0.0.1/src/warg_openapi/models/fetch_logs_log_length_not_found_error.py +82 -0
  26. wasm_action-0.0.1/src/warg_openapi/models/fetch_logs_request.py +99 -0
  27. wasm_action-0.0.1/src/warg_openapi/models/fetch_logs_response.py +93 -0
  28. wasm_action-0.0.1/src/warg_openapi/models/fetch_names404_response.py +94 -0
  29. wasm_action-0.0.1/src/warg_openapi/models/fetch_package_names_request.py +71 -0
  30. wasm_action-0.0.1/src/warg_openapi/models/fetch_package_names_response.py +83 -0
  31. wasm_action-0.0.1/src/warg_openapi/models/fetch_warning.py +71 -0
  32. wasm_action-0.0.1/src/warg_openapi/models/get_content_sources404_response.py +101 -0
  33. wasm_action-0.0.1/src/warg_openapi/models/get_package_record404_response.py +101 -0
  34. wasm_action-0.0.1/src/warg_openapi/models/http_get.py +84 -0
  35. wasm_action-0.0.1/src/warg_openapi/models/http_upload.py +95 -0
  36. wasm_action-0.0.1/src/warg_openapi/models/http_upload_headers.py +73 -0
  37. wasm_action-0.0.1/src/warg_openapi/models/incorrect_proof_error.py +98 -0
  38. wasm_action-0.0.1/src/warg_openapi/models/ledger_sources_response.py +103 -0
  39. wasm_action-0.0.1/src/warg_openapi/models/ledger_sources_response_sources_inner.py +86 -0
  40. wasm_action-0.0.1/src/warg_openapi/models/missing_content.py +79 -0
  41. wasm_action-0.0.1/src/warg_openapi/models/package_not_included_error.py +89 -0
  42. wasm_action-0.0.1/src/warg_openapi/models/package_record.py +93 -0
  43. wasm_action-0.0.1/src/warg_openapi/models/processing_record.py +78 -0
  44. wasm_action-0.0.1/src/warg_openapi/models/prove_consistency404_response.py +94 -0
  45. wasm_action-0.0.1/src/warg_openapi/models/prove_consistency_request.py +73 -0
  46. wasm_action-0.0.1/src/warg_openapi/models/prove_consistency_response.py +71 -0
  47. wasm_action-0.0.1/src/warg_openapi/models/prove_inclusion404_response.py +94 -0
  48. wasm_action-0.0.1/src/warg_openapi/models/prove_inclusion422_response.py +158 -0
  49. wasm_action-0.0.1/src/warg_openapi/models/prove_inclusion_request.py +73 -0
  50. wasm_action-0.0.1/src/warg_openapi/models/prove_inclusion_response.py +73 -0
  51. wasm_action-0.0.1/src/warg_openapi/models/publish_package_record404_response.py +94 -0
  52. wasm_action-0.0.1/src/warg_openapi/models/publish_package_record409_response.py +94 -0
  53. wasm_action-0.0.1/src/warg_openapi/models/publish_package_record_request.py +79 -0
  54. wasm_action-0.0.1/src/warg_openapi/models/published_record.py +80 -0
  55. wasm_action-0.0.1/src/warg_openapi/models/published_record_envelope.py +93 -0
  56. wasm_action-0.0.1/src/warg_openapi/models/rejected_record.py +80 -0
  57. wasm_action-0.0.1/src/warg_openapi/models/signature.py +87 -0
  58. wasm_action-0.0.1/src/warg_openapi/models/signed_checkpoint.py +93 -0
  59. wasm_action-0.0.1/src/warg_openapi/models/sourcing_record.py +80 -0
  60. wasm_action-0.0.1/src/warg_openapi/models/timestamped_checkpoint.py +91 -0
  61. wasm_action-0.0.1/src/warg_openapi/py.typed +0 -0
  62. wasm_action-0.0.1/src/warg_openapi/rest.py +329 -0
  63. wasm_action-0.0.1/src/wasm_action/__init__.py +0 -0
  64. wasm_action-0.0.1/src/wasm_action/action.py +133 -0
  65. wasm_action-0.0.1/src/wasm_action/model.py +28 -0
  66. wasm_action-0.0.1/src/wasm_action/util.py +66 -0
  67. wasm_action-0.0.1/src/wasm_action/warg_client.py +73 -0
  68. wasm_action-0.0.1/src/wasm_action/warg_crypto.py +132 -0
  69. wasm_action-0.0.1/src/wasm_action/warg_proto.py +69 -0
  70. wasm_action-0.0.1/src/wasm_action/warg_pull.py +93 -0
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.3
2
+ Name: wasm-action
3
+ Version: 0.0.1
4
+ Summary: Interact with WebAssembly registries.
5
+ Requires-Dist: click>=8.2.1
6
+ Requires-Dist: cryptography>=45.0.6
7
+ Requires-Dist: leb128>=1.0.8
8
+ Requires-Dist: protobuf>=6.32.1
9
+ Requires-Dist: pydantic<2
10
+ Requires-Dist: python-dateutil>=2.8.2
11
+ Requires-Dist: requests>=2.32.4
12
+ Requires-Dist: semver>=3.0.4
13
+ Requires-Dist: urllib3>=1.25.3
14
+ Requires-Dist: validators>=0.35.0
15
+ Requires-Python: >=3.12
16
+ Description-Content-Type: text/markdown
17
+
18
+ # wasm-action
19
+
20
+ **Interact with WebAssembly registries.**
21
+
22
+ ## Features
23
+ * Versatile use as a GitHub action, CLI or Python library.
24
+ * Supported registry types: warg (wa.dev)
25
+ * Supported artifact types: wasm
26
+ * Supported actions: pull
27
+
28
+ ## Usage
29
+ ### Pull from registry
30
+ ```
31
+ - name: Pull from registry
32
+ uses: xelato/wasm-action
33
+ id: pull
34
+ with:
35
+ action: pull
36
+ registry: wa.dev
37
+ namespace: component-book
38
+ name: adder
39
+ ```
40
+
41
+ Outputs:
42
+ ```
43
+ - name: Display outputs
44
+ shell: bash
45
+ run: |
46
+ echo "registry:" ${{ steps.pull.outputs.registry }}
47
+ echo "registry-type:" ${{ steps.pull.outputs.registry-type }}
48
+ echo "namespace:" ${{ steps.pull.outputs.namespace }}
49
+ echo "name:" ${{ steps.pull.outputs.name }}
50
+ echo "version:" ${{ steps.pull.outputs.version }}
51
+ echo "filename:" ${{ steps.pull.outputs.filename }}
52
+ echo "digest:" ${{ steps.pull.outputs.digest }}
53
+ ```
@@ -0,0 +1,36 @@
1
+ # wasm-action
2
+
3
+ **Interact with WebAssembly registries.**
4
+
5
+ ## Features
6
+ * Versatile use as a GitHub action, CLI or Python library.
7
+ * Supported registry types: warg (wa.dev)
8
+ * Supported artifact types: wasm
9
+ * Supported actions: pull
10
+
11
+ ## Usage
12
+ ### Pull from registry
13
+ ```
14
+ - name: Pull from registry
15
+ uses: xelato/wasm-action
16
+ id: pull
17
+ with:
18
+ action: pull
19
+ registry: wa.dev
20
+ namespace: component-book
21
+ name: adder
22
+ ```
23
+
24
+ Outputs:
25
+ ```
26
+ - name: Display outputs
27
+ shell: bash
28
+ run: |
29
+ echo "registry:" ${{ steps.pull.outputs.registry }}
30
+ echo "registry-type:" ${{ steps.pull.outputs.registry-type }}
31
+ echo "namespace:" ${{ steps.pull.outputs.namespace }}
32
+ echo "name:" ${{ steps.pull.outputs.name }}
33
+ echo "version:" ${{ steps.pull.outputs.version }}
34
+ echo "filename:" ${{ steps.pull.outputs.filename }}
35
+ echo "digest:" ${{ steps.pull.outputs.digest }}
36
+ ```
@@ -0,0 +1,28 @@
1
+ [project]
2
+ name = "wasm-action"
3
+ version = "0.0.1"
4
+ description = "Interact with WebAssembly registries."
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "click>=8.2.1",
9
+ "cryptography>=45.0.6",
10
+ "leb128>=1.0.8",
11
+ "protobuf>=6.32.1",
12
+ "pydantic<2",
13
+ "python-dateutil>=2.8.2",
14
+ "requests>=2.32.4",
15
+ "semver>=3.0.4",
16
+ "urllib3>=1.25.3",
17
+ "validators>=0.35.0",
18
+ ]
19
+
20
+ [project.scripts]
21
+ wasm-action = "wasm_action.action:main"
22
+
23
+ [build-system]
24
+ requires = ["uv_build>=0.9.3,<0.10.0"]
25
+ build-backend = "uv_build"
26
+
27
+ [tool.uv.build-backend]
28
+ module-name = ["wasm_action", "warg_openapi"]
@@ -0,0 +1,145 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ Warg Registry API
7
+
8
+ [warg](https://warg.io/) is an open source protocol for WebAssembly component registries.
9
+
10
+ The version of the OpenAPI document: 1.0.0
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
+
13
+ Do not edit the class manually.
14
+ """ # noqa: E501
15
+
16
+
17
+ __version__ = "1.0.0"
18
+
19
+ # Define package exports
20
+ __all__ = [
21
+ "ContentApi",
22
+ "FetchApi",
23
+ "LedgerApi",
24
+ "MonitorApi",
25
+ "PackageApi",
26
+ "ProofApi",
27
+ "ApiResponse",
28
+ "ApiClient",
29
+ "Configuration",
30
+ "OpenApiException",
31
+ "ApiTypeError",
32
+ "ApiValueError",
33
+ "ApiKeyError",
34
+ "ApiAttributeError",
35
+ "ApiException",
36
+ "BundleFailureError",
37
+ "Checkpoint",
38
+ "CheckpointVerificationResponse",
39
+ "ContentSourcesResponse",
40
+ "EnvelopeBody",
41
+ "Error",
42
+ "FetchLogs404Response",
43
+ "FetchLogsIDNotFoundError",
44
+ "FetchLogsLogLengthNotFoundError",
45
+ "FetchLogsRequest",
46
+ "FetchLogsResponse",
47
+ "FetchNames404Response",
48
+ "FetchPackageNamesRequest",
49
+ "FetchPackageNamesResponse",
50
+ "FetchWarning",
51
+ "GetContentSources404Response",
52
+ "GetPackageRecord404Response",
53
+ "HttpGet",
54
+ "HttpUpload",
55
+ "HttpUploadHeaders",
56
+ "IncorrectProofError",
57
+ "LedgerSourcesResponse",
58
+ "LedgerSourcesResponseSourcesInner",
59
+ "MissingContent",
60
+ "PackageNotIncludedError",
61
+ "PackageRecord",
62
+ "ProcessingRecord",
63
+ "ProveConsistency404Response",
64
+ "ProveConsistencyRequest",
65
+ "ProveConsistencyResponse",
66
+ "ProveInclusion404Response",
67
+ "ProveInclusion422Response",
68
+ "ProveInclusionRequest",
69
+ "ProveInclusionResponse",
70
+ "PublishPackageRecord404Response",
71
+ "PublishPackageRecord409Response",
72
+ "PublishPackageRecordRequest",
73
+ "PublishedRecord",
74
+ "PublishedRecordEnvelope",
75
+ "RejectedRecord",
76
+ "Signature",
77
+ "SignedCheckpoint",
78
+ "SourcingRecord",
79
+ "TimestampedCheckpoint",
80
+ ]
81
+
82
+ # import apis into sdk package
83
+ from warg_openapi.api.content_api import ContentApi as ContentApi
84
+ from warg_openapi.api.fetch_api import FetchApi as FetchApi
85
+ from warg_openapi.api.ledger_api import LedgerApi as LedgerApi
86
+ from warg_openapi.api.monitor_api import MonitorApi as MonitorApi
87
+ from warg_openapi.api.package_api import PackageApi as PackageApi
88
+ from warg_openapi.api.proof_api import ProofApi as ProofApi
89
+
90
+ # import ApiClient
91
+ from warg_openapi.api_response import ApiResponse as ApiResponse
92
+ from warg_openapi.api_client import ApiClient as ApiClient
93
+ from warg_openapi.configuration import Configuration as Configuration
94
+ from warg_openapi.exceptions import OpenApiException as OpenApiException
95
+ from warg_openapi.exceptions import ApiTypeError as ApiTypeError
96
+ from warg_openapi.exceptions import ApiValueError as ApiValueError
97
+ from warg_openapi.exceptions import ApiKeyError as ApiKeyError
98
+ from warg_openapi.exceptions import ApiAttributeError as ApiAttributeError
99
+ from warg_openapi.exceptions import ApiException as ApiException
100
+
101
+ # import models into sdk package
102
+ from warg_openapi.models.bundle_failure_error import BundleFailureError as BundleFailureError
103
+ from warg_openapi.models.checkpoint import Checkpoint as Checkpoint
104
+ from warg_openapi.models.checkpoint_verification_response import CheckpointVerificationResponse as CheckpointVerificationResponse
105
+ from warg_openapi.models.content_sources_response import ContentSourcesResponse as ContentSourcesResponse
106
+ from warg_openapi.models.envelope_body import EnvelopeBody as EnvelopeBody
107
+ from warg_openapi.models.error import Error as Error
108
+ from warg_openapi.models.fetch_logs404_response import FetchLogs404Response as FetchLogs404Response
109
+ from warg_openapi.models.fetch_logs_id_not_found_error import FetchLogsIDNotFoundError as FetchLogsIDNotFoundError
110
+ from warg_openapi.models.fetch_logs_log_length_not_found_error import FetchLogsLogLengthNotFoundError as FetchLogsLogLengthNotFoundError
111
+ from warg_openapi.models.fetch_logs_request import FetchLogsRequest as FetchLogsRequest
112
+ from warg_openapi.models.fetch_logs_response import FetchLogsResponse as FetchLogsResponse
113
+ from warg_openapi.models.fetch_names404_response import FetchNames404Response as FetchNames404Response
114
+ from warg_openapi.models.fetch_package_names_request import FetchPackageNamesRequest as FetchPackageNamesRequest
115
+ from warg_openapi.models.fetch_package_names_response import FetchPackageNamesResponse as FetchPackageNamesResponse
116
+ from warg_openapi.models.fetch_warning import FetchWarning as FetchWarning
117
+ from warg_openapi.models.get_content_sources404_response import GetContentSources404Response as GetContentSources404Response
118
+ from warg_openapi.models.get_package_record404_response import GetPackageRecord404Response as GetPackageRecord404Response
119
+ from warg_openapi.models.http_get import HttpGet as HttpGet
120
+ from warg_openapi.models.http_upload import HttpUpload as HttpUpload
121
+ from warg_openapi.models.http_upload_headers import HttpUploadHeaders as HttpUploadHeaders
122
+ from warg_openapi.models.incorrect_proof_error import IncorrectProofError as IncorrectProofError
123
+ from warg_openapi.models.ledger_sources_response import LedgerSourcesResponse as LedgerSourcesResponse
124
+ from warg_openapi.models.ledger_sources_response_sources_inner import LedgerSourcesResponseSourcesInner as LedgerSourcesResponseSourcesInner
125
+ from warg_openapi.models.missing_content import MissingContent as MissingContent
126
+ from warg_openapi.models.package_not_included_error import PackageNotIncludedError as PackageNotIncludedError
127
+ from warg_openapi.models.package_record import PackageRecord as PackageRecord
128
+ from warg_openapi.models.processing_record import ProcessingRecord as ProcessingRecord
129
+ from warg_openapi.models.prove_consistency404_response import ProveConsistency404Response as ProveConsistency404Response
130
+ from warg_openapi.models.prove_consistency_request import ProveConsistencyRequest as ProveConsistencyRequest
131
+ from warg_openapi.models.prove_consistency_response import ProveConsistencyResponse as ProveConsistencyResponse
132
+ from warg_openapi.models.prove_inclusion404_response import ProveInclusion404Response as ProveInclusion404Response
133
+ from warg_openapi.models.prove_inclusion422_response import ProveInclusion422Response as ProveInclusion422Response
134
+ from warg_openapi.models.prove_inclusion_request import ProveInclusionRequest as ProveInclusionRequest
135
+ from warg_openapi.models.prove_inclusion_response import ProveInclusionResponse as ProveInclusionResponse
136
+ from warg_openapi.models.publish_package_record404_response import PublishPackageRecord404Response as PublishPackageRecord404Response
137
+ from warg_openapi.models.publish_package_record409_response import PublishPackageRecord409Response as PublishPackageRecord409Response
138
+ from warg_openapi.models.publish_package_record_request import PublishPackageRecordRequest as PublishPackageRecordRequest
139
+ from warg_openapi.models.published_record import PublishedRecord as PublishedRecord
140
+ from warg_openapi.models.published_record_envelope import PublishedRecordEnvelope as PublishedRecordEnvelope
141
+ from warg_openapi.models.rejected_record import RejectedRecord as RejectedRecord
142
+ from warg_openapi.models.signature import Signature as Signature
143
+ from warg_openapi.models.signed_checkpoint import SignedCheckpoint as SignedCheckpoint
144
+ from warg_openapi.models.sourcing_record import SourcingRecord as SourcingRecord
145
+ from warg_openapi.models.timestamped_checkpoint import TimestampedCheckpoint as TimestampedCheckpoint
@@ -0,0 +1,10 @@
1
+ # flake8: noqa
2
+
3
+ # import apis into api package
4
+ from warg_openapi.api.content_api import ContentApi
5
+ from warg_openapi.api.fetch_api import FetchApi
6
+ from warg_openapi.api.ledger_api import LedgerApi
7
+ from warg_openapi.api.monitor_api import MonitorApi
8
+ from warg_openapi.api.package_api import PackageApi
9
+ from warg_openapi.api.proof_api import ProofApi
10
+
@@ -0,0 +1,195 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Warg Registry API
5
+
6
+ [warg](https://warg.io/) is an open source protocol for WebAssembly component registries.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import re # noqa: F401
16
+ import io
17
+ import warnings
18
+
19
+ from pydantic import validate_arguments, ValidationError
20
+
21
+ from typing_extensions import Annotated
22
+ from pydantic import Field, StrictStr, constr, validator
23
+
24
+ from typing import Optional
25
+
26
+ from warg_openapi.models.content_sources_response import ContentSourcesResponse
27
+
28
+ from warg_openapi.api_client import ApiClient
29
+ from warg_openapi.api_response import ApiResponse
30
+ from warg_openapi.exceptions import ( # noqa: F401
31
+ ApiTypeError,
32
+ ApiValueError
33
+ )
34
+
35
+
36
+ class ContentApi:
37
+ """NOTE: This class is auto generated by OpenAPI Generator
38
+ Ref: https://openapi-generator.tech
39
+
40
+ Do not edit the class manually.
41
+ """
42
+
43
+ def __init__(self, api_client=None) -> None:
44
+ if api_client is None:
45
+ api_client = ApiClient.get_default()
46
+ self.api_client = api_client
47
+
48
+ @validate_arguments
49
+ def get_content_sources(self, digest : Annotated[constr(strict=True), Field(..., description="The content digest.")], warg_registry : Annotated[Optional[StrictStr], Field(description="If present and supported, this registry responds on behalf of the other registry specified in this header value.")] = None, **kwargs) -> ContentSourcesResponse: # noqa: E501
50
+ """Get content sources # noqa: E501
51
+
52
+ Gets a content sources for the given digest from the registry. # noqa: E501
53
+ This method makes a synchronous HTTP request by default. To make an
54
+ asynchronous HTTP request, please pass async_req=True
55
+
56
+ >>> thread = api.get_content_sources(digest, warg_registry, async_req=True)
57
+ >>> result = thread.get()
58
+
59
+ :param digest: The content digest. (required)
60
+ :type digest: str
61
+ :param warg_registry: If present and supported, this registry responds on behalf of the other registry specified in this header value.
62
+ :type warg_registry: str
63
+ :param async_req: Whether to execute the request asynchronously.
64
+ :type async_req: bool, optional
65
+ :param _request_timeout: timeout setting for this request.
66
+ If one number provided, it will be total request
67
+ timeout. It can also be a pair (tuple) of
68
+ (connection, read) timeouts.
69
+ :return: Returns the result object.
70
+ If the method is called asynchronously,
71
+ returns the request thread.
72
+ :rtype: ContentSourcesResponse
73
+ """
74
+ kwargs['_return_http_data_only'] = True
75
+ if '_preload_content' in kwargs:
76
+ message = "Error! Please call the get_content_sources_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
77
+ raise ValueError(message)
78
+ return self.get_content_sources_with_http_info(digest, warg_registry, **kwargs) # noqa: E501
79
+
80
+ @validate_arguments
81
+ def get_content_sources_with_http_info(self, digest : Annotated[constr(strict=True), Field(..., description="The content digest.")], warg_registry : Annotated[Optional[StrictStr], Field(description="If present and supported, this registry responds on behalf of the other registry specified in this header value.")] = None, **kwargs) -> ApiResponse: # noqa: E501
82
+ """Get content sources # noqa: E501
83
+
84
+ Gets a content sources for the given digest from the registry. # noqa: E501
85
+ This method makes a synchronous HTTP request by default. To make an
86
+ asynchronous HTTP request, please pass async_req=True
87
+
88
+ >>> thread = api.get_content_sources_with_http_info(digest, warg_registry, async_req=True)
89
+ >>> result = thread.get()
90
+
91
+ :param digest: The content digest. (required)
92
+ :type digest: str
93
+ :param warg_registry: If present and supported, this registry responds on behalf of the other registry specified in this header value.
94
+ :type warg_registry: str
95
+ :param async_req: Whether to execute the request asynchronously.
96
+ :type async_req: bool, optional
97
+ :param _preload_content: if False, the ApiResponse.data will
98
+ be set to none and raw_data will store the
99
+ HTTP response body without reading/decoding.
100
+ Default is True.
101
+ :type _preload_content: bool, optional
102
+ :param _return_http_data_only: response data instead of ApiResponse
103
+ object with status code, headers, etc
104
+ :type _return_http_data_only: bool, optional
105
+ :param _request_timeout: timeout setting for this request. If one
106
+ number provided, it will be total request
107
+ timeout. It can also be a pair (tuple) of
108
+ (connection, read) timeouts.
109
+ :param _request_auth: set to override the auth_settings for an a single
110
+ request; this effectively ignores the authentication
111
+ in the spec for a single request.
112
+ :type _request_auth: dict, optional
113
+ :type _content_type: string, optional: force content-type for the request
114
+ :return: Returns the result object.
115
+ If the method is called asynchronously,
116
+ returns the request thread.
117
+ :rtype: tuple(ContentSourcesResponse, status_code(int), headers(HTTPHeaderDict))
118
+ """
119
+
120
+ _params = locals()
121
+
122
+ _all_params = [
123
+ 'digest',
124
+ 'warg_registry'
125
+ ]
126
+ _all_params.extend(
127
+ [
128
+ 'async_req',
129
+ '_return_http_data_only',
130
+ '_preload_content',
131
+ '_request_timeout',
132
+ '_request_auth',
133
+ '_content_type',
134
+ '_headers'
135
+ ]
136
+ )
137
+
138
+ # validate the arguments
139
+ for _key, _val in _params['kwargs'].items():
140
+ if _key not in _all_params:
141
+ raise ApiTypeError(
142
+ "Got an unexpected keyword argument '%s'"
143
+ " to method get_content_sources" % _key
144
+ )
145
+ _params[_key] = _val
146
+ del _params['kwargs']
147
+
148
+ _collection_formats = {}
149
+
150
+ # process the path parameters
151
+ _path_params = {}
152
+ if _params['digest'] is not None:
153
+ _path_params['digest'] = _params['digest']
154
+
155
+
156
+ # process the query parameters
157
+ _query_params = []
158
+ # process the header parameters
159
+ _header_params = dict(_params.get('_headers', {}))
160
+ if _params['warg_registry'] is not None:
161
+ _header_params['Warg-Registry'] = _params['warg_registry']
162
+
163
+ # process the form parameters
164
+ _form_params = []
165
+ _files = {}
166
+ # process the body parameter
167
+ _body_params = None
168
+ # set the HTTP header `Accept`
169
+ _header_params['Accept'] = self.api_client.select_header_accept(
170
+ ['application/json']) # noqa: E501
171
+
172
+ # authentication setting
173
+ _auth_settings = [] # noqa: E501
174
+
175
+ _response_types_map = {
176
+ '200': "ContentSourcesResponse",
177
+ '404': "GetContentSources404Response",
178
+ }
179
+
180
+ return self.api_client.call_api(
181
+ '/content/{digest}', 'GET',
182
+ _path_params,
183
+ _query_params,
184
+ _header_params,
185
+ body=_body_params,
186
+ post_params=_form_params,
187
+ files=_files,
188
+ response_types_map=_response_types_map,
189
+ auth_settings=_auth_settings,
190
+ async_req=_params.get('async_req'),
191
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
192
+ _preload_content=_params.get('_preload_content', True),
193
+ _request_timeout=_params.get('_request_timeout'),
194
+ collection_formats=_collection_formats,
195
+ _request_auth=_params.get('_request_auth'))