automated-package-publishing-sdk 0.1.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 (88) hide show
  1. automated_package_publishing_sdk-0.1.1/LICENSE +21 -0
  2. automated_package_publishing_sdk-0.1.1/PKG-INFO +172 -0
  3. automated_package_publishing_sdk-0.1.1/README.md +141 -0
  4. automated_package_publishing_sdk-0.1.1/pyproject.toml +74 -0
  5. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/__init__.py +15 -0
  6. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/apis/__init__.py +5 -0
  7. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/apis/pet_api.py +915 -0
  8. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/apis/store.py +429 -0
  9. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/apis/user_api.py +826 -0
  10. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/async_client.py +82 -0
  11. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/auth.py +17 -0
  12. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/base_client.py +25 -0
  13. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/client.py +80 -0
  14. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/__init__.py +366 -0
  15. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/_internal/__init__.py +9 -0
  16. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/_internal/content_disposition.py +154 -0
  17. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/_internal/flattening.py +139 -0
  18. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/_internal/headers.py +144 -0
  19. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/_internal/sse_parser.py +124 -0
  20. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/_internal/subscripts.py +50 -0
  21. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/_internal/urls.py +186 -0
  22. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/_internal/wire.py +198 -0
  23. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/adapters.py +177 -0
  24. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/__init__.py +70 -0
  25. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/composition.py +175 -0
  26. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/models.py +216 -0
  27. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/protocols.py +103 -0
  28. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/schemes/__init__.py +94 -0
  29. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/schemes/api_key_auth.py +53 -0
  30. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/schemes/basic_auth.py +73 -0
  31. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/schemes/bearer_auth.py +21 -0
  32. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/schemes/oauth2_authorization_code.py +393 -0
  33. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/schemes/oauth2_client_credentials.py +127 -0
  34. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/schemes/oauth2_password.py +142 -0
  35. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/auth/schemes/oauth2_schemes.py +300 -0
  36. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/base_raw_response.py +49 -0
  37. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/bodies.py +550 -0
  38. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/converters/__init__.py +68 -0
  39. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/converters/date_time.py +237 -0
  40. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/converters/encoded_bytes.py +273 -0
  41. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/converters/open_enum.py +35 -0
  42. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/decoding.py +498 -0
  43. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/discriminators.py +129 -0
  44. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/event_streams.py +225 -0
  45. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/exceptions.py +78 -0
  46. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/file_responses.py +335 -0
  47. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/files.py +174 -0
  48. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/httpx2_transport.py +781 -0
  49. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/models.py +143 -0
  50. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/optionality.py +130 -0
  51. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/params.py +157 -0
  52. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/raw_client.py +518 -0
  53. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/request_options.py +162 -0
  54. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/results.py +123 -0
  55. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/retries.py +229 -0
  56. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/runtime_env.py +43 -0
  57. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/servers.py +33 -0
  58. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/core/transport.py +217 -0
  59. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/__init__.py +48 -0
  60. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/add_pet_error.py +21 -0
  61. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/delete_order_error.py +21 -0
  62. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/delete_pet_error.py +21 -0
  63. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/delete_user_error.py +21 -0
  64. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/find_pets_by_status_error.py +21 -0
  65. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/find_pets_by_tags_error.py +21 -0
  66. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/get_order_by_id_error.py +21 -0
  67. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/get_pet_by_id_error.py +21 -0
  68. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/get_user_by_name_error.py +21 -0
  69. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/login_user_error.py +21 -0
  70. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/place_order_error.py +21 -0
  71. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/update_pet_error.py +21 -0
  72. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/update_pet_with_form_error.py +21 -0
  73. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/update_user_error.py +21 -0
  74. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/errors/upload_file_error.py +21 -0
  75. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/models/__init__.py +23 -0
  76. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/models/api_response.py +18 -0
  77. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/models/category.py +15 -0
  78. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/models/enums/__init__.py +4 -0
  79. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/models/enums/order_status.py +17 -0
  80. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/models/enums/pet_status.py +17 -0
  81. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/models/order.py +27 -0
  82. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/models/pet.py +28 -0
  83. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/models/tag_model.py +15 -0
  84. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/models/user.py +29 -0
  85. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/py.typed +0 -0
  86. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/server/__init__.py +21 -0
  87. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/server/server.py +17 -0
  88. automated_package_publishing_sdk-0.1.1/swagger_petstore_open_api_3_1_0/server/server_config.py +52 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 APIMatic
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.4
2
+ Name: automated-package-publishing-sdk
3
+ Version: 0.1.1
4
+ Summary: wfgw
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Keywords: sdk,api-client,openapi,rest,http,apimatic
8
+ Author: Package Publisher
9
+ Author-email: support@pp.org
10
+ Maintainer: APIMatic
11
+ Maintainer-email: support@apimatic.io
12
+ Requires-Python: >=3.10
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Typing :: Typed
21
+ Classifier: Operating System :: OS Independent
22
+ Classifier: Topic :: Internet :: WWW/HTTP
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Dist: certifi (>=2024.7.4)
25
+ Requires-Dist: httpx2 (>=2.13.1,<3.0.0)
26
+ Requires-Dist: pydantic[email] (>=2.11.0,<3.0.0)
27
+ Requires-Dist: typing-extensions (>=4.13.0,<5.0.0)
28
+ Project-URL: Documentation, https://docs.pp.org
29
+ Description-Content-Type: text/markdown
30
+
31
+ # Swagger Petstore - OpenAPI 3.1.0 SDK
32
+
33
+ [![Built with APIMatic][apimatic-badge]][apimatic-url] [![License: MIT][license-badge]][license-url] [![Python 3.10+][python-badge]][python-url]
34
+
35
+ The Swagger Petstore - OpenAPI 3.1.0 SDK for Python provides access to the [Swagger Petstore - OpenAPI 3.1.0 REST APIs](https://swagger.io) from Python applications.
36
+
37
+ > [!TIP]
38
+ > **Looking for a specific signature, model, enum, or error type?** This SDK ships a generated
39
+ > **[SDK map](sdk-map.md)** -- a lookup index of the SDK's entire Python surface. Consult it before
40
+ > scanning the source tree; details under [SDK map](#sdk-map).
41
+
42
+ This is a sample Pet Store Server based on the OpenAPI 3.1.0 specification. You can find out more about
43
+ Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!
44
+ You can now help us improve the API whether it's by making changes to the definition itself or to the code.
45
+ That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
46
+
47
+ Some useful links:
48
+ - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
49
+ - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
50
+
51
+ ---
52
+
53
+ ## Installation
54
+
55
+ To install the Python SDK from PyPI, with whichever package manager your project uses:
56
+
57
+ ```bash
58
+ pip install automated-package-publishing-sdk
59
+ ```
60
+
61
+ ```bash
62
+ uv add automated-package-publishing-sdk
63
+ ```
64
+
65
+ ```bash
66
+ poetry add automated-package-publishing-sdk
67
+ ```
68
+
69
+ To install from the SDK source instead, give the tool a path containing a slash — a bare folder name is looked up on PyPI, and resolves to whatever project holds that name there:
70
+
71
+ ```bash
72
+ pip install <path-to-sdk>
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Quick Start
78
+
79
+ ### Synchronous client
80
+
81
+ Construct `SwaggerPetstoreOpenApi310Client` with keyword arguments, and call `close()` when you are done. Every argument is optional; the full list is in the [SDK map](sdk-map.md).
82
+
83
+ ```python
84
+ from swagger_petstore_open_api_3_1_0 import SwaggerPetstoreOpenApi310Client
85
+
86
+ client = SwaggerPetstoreOpenApi310Client(petstore_auth="YOUR_API_KEY", api_key="YOUR_API_KEY")
87
+
88
+ # TODO: call endpoints here -- see api-reference.md
89
+
90
+ client.close()
91
+ ```
92
+
93
+ Alternatively, scope it -- `with SwaggerPetstoreOpenApi310Client(...) as client:` closes the pool on exit; see [Best Practices](#best-practices).
94
+
95
+ `Client` is exported as an alias of `SwaggerPetstoreOpenApi310Client`, so `from swagger_petstore_open_api_3_1_0 import Client` also works.
96
+
97
+ The SDK accepts every model-typed input in two interchangeable spellings, both type-checked: the typed model, or a plain dict with the same keys -- the `OrDict` and `Model | ModelDict` unions in the [SDK map](sdk-map.md). Pick whichever suits the call site: the dict form needs no import, while the model form adds a keyword-checked constructor and editor completion.
98
+
99
+ ### Asynchronous client
100
+
101
+ `AsyncSwaggerPetstoreOpenApi310Client` mirrors `SwaggerPetstoreOpenApi310Client` with **identical method names**, and every endpoint method is a coroutine. It takes the same arguments, with some differences -- for example, the transport argument is `custom_async_http_client`.
102
+
103
+ ```python
104
+ from asyncio import run
105
+
106
+ from swagger_petstore_open_api_3_1_0 import AsyncSwaggerPetstoreOpenApi310Client
107
+
108
+
109
+ async def main() -> None:
110
+ client = AsyncSwaggerPetstoreOpenApi310Client(petstore_auth="YOUR_API_KEY", api_key="YOUR_API_KEY")
111
+ # TODO: call endpoints here, awaiting each -- see api-reference.md
112
+ await client.aclose()
113
+
114
+
115
+ run(main())
116
+ ```
117
+
118
+ Alternatively, scope it -- `async with AsyncSwaggerPetstoreOpenApi310Client(...) as client:` closes the pool on exit. Only the async spelling is `aclose`, matching httpx2; see [Best Practices](#best-practices).
119
+
120
+ `AsyncClient` is the exported alias. Each client accepts **only** its own transport argument; passing the other's is a `TypeError` at runtime and an error under mypy.
121
+
122
+ ---
123
+
124
+ ## Usage
125
+
126
+ Two generated references cover the SDK; each answers a different question:
127
+
128
+ | Reference | For |
129
+ | --- | --- |
130
+ | **[API Reference](api-reference.md)** | Usage guidance for a single **parsed** operation: `client.<group>.<operation>(...)` returns the typed payload and raises `ApiError` on any non-2xx, with `.error` the typed error body, or `RawError` for a status the operation does not document. |
131
+ | **[Raw API Reference](raw-api-reference.md)** | The same for the **raw** variant: `client.<group>.with_raw_response.<operation>(...)` returns `ApiResult[T, E]` and never raises for an API error. |
132
+
133
+ Both API references carry every one of the 19 operations, with a sync and an async sample and a parameter table each.
134
+
135
+ ## SDK map
136
+
137
+ This SDK ships a generated **SDK map** -- [`sdk-map.md`](sdk-map.md) -- a deterministic, lookup-oriented table of contents of the SDK's Python surface, generated by APIMatic alongside this SDK.
138
+
139
+ Consult the map before scanning or grepping the source: it answers call-level contract questions by lookup, and for anything it does not carry -- model shapes, enum values, an endpoint's route or behavioural prose -- it names the one source file to read. How to read the map itself, including the SDK-wide defaults its rows rely on, is stated at the top of [`sdk-map.md`](sdk-map.md).
140
+
141
+ ## Best Practices
142
+
143
+ > [!TIP]
144
+ > Use a **single `SwaggerPetstoreOpenApi310Client` instance** for the lifetime of your application and reuse it across
145
+ > all requests. Each instance owns its own connection pool, so an instance per request forfeits
146
+ > connection reuse and leaks pools that are never closed.
147
+
148
+ Match the disposal to the client's lifetime: an application-lifetime client is closed once at shutdown with `close()` / `aclose()`; where the lifetime fits a block, `with SwaggerPetstoreOpenApi310Client() as client:` / `async with AsyncSwaggerPetstoreOpenApi310Client() as client:` releases it automatically. Both are idempotent, but a closed client is not reusable: the next call raises. The client closes **whatever transport it holds**, including one you supplied via `custom_http_client` / `custom_async_http_client`; if you intend to reuse your own transport across clients, don't hand its lifetime to a `with` block.
149
+
150
+ **Retries are on by default**: a failed idempotent request — a retryable status or no response at all — is sent again up to three times before the call gives up. Pass `retry_options=0` to turn it off, for instance in a test that stubs an error response; the policy and its defaults are under **Retries** in the SDK map.
151
+
152
+ ## License
153
+
154
+ This SDK is distributed under the [MIT License][license-url].
155
+
156
+ ---
157
+
158
+ ## Support
159
+
160
+ Refer to the [API reference](api-reference.md) for detailed information on available operations with code samples.
161
+
162
+ For further assistance, please contact support at apiteam@swagger.io.
163
+
164
+ ---
165
+
166
+ [license-url]: LICENSE
167
+ [license-badge]: https://img.shields.io/badge/License-MIT-blue.svg
168
+ [apimatic-url]: https://www.apimatic.io
169
+ [apimatic-badge]: https://www.apimatic.io/hubfs/Built-with-APIMatic-badge.svg
170
+ [python-url]: https://www.python.org/downloads/
171
+ [python-badge]: https://img.shields.io/badge/python-3.10%2B-blue.svg
172
+
@@ -0,0 +1,141 @@
1
+ # Swagger Petstore - OpenAPI 3.1.0 SDK
2
+
3
+ [![Built with APIMatic][apimatic-badge]][apimatic-url] [![License: MIT][license-badge]][license-url] [![Python 3.10+][python-badge]][python-url]
4
+
5
+ The Swagger Petstore - OpenAPI 3.1.0 SDK for Python provides access to the [Swagger Petstore - OpenAPI 3.1.0 REST APIs](https://swagger.io) from Python applications.
6
+
7
+ > [!TIP]
8
+ > **Looking for a specific signature, model, enum, or error type?** This SDK ships a generated
9
+ > **[SDK map](sdk-map.md)** -- a lookup index of the SDK's entire Python surface. Consult it before
10
+ > scanning the source tree; details under [SDK map](#sdk-map).
11
+
12
+ This is a sample Pet Store Server based on the OpenAPI 3.1.0 specification. You can find out more about
13
+ Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!
14
+ You can now help us improve the API whether it's by making changes to the definition itself or to the code.
15
+ That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
16
+
17
+ Some useful links:
18
+ - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
19
+ - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
20
+
21
+ ---
22
+
23
+ ## Installation
24
+
25
+ To install the Python SDK from PyPI, with whichever package manager your project uses:
26
+
27
+ ```bash
28
+ pip install automated-package-publishing-sdk
29
+ ```
30
+
31
+ ```bash
32
+ uv add automated-package-publishing-sdk
33
+ ```
34
+
35
+ ```bash
36
+ poetry add automated-package-publishing-sdk
37
+ ```
38
+
39
+ To install from the SDK source instead, give the tool a path containing a slash — a bare folder name is looked up on PyPI, and resolves to whatever project holds that name there:
40
+
41
+ ```bash
42
+ pip install <path-to-sdk>
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Quick Start
48
+
49
+ ### Synchronous client
50
+
51
+ Construct `SwaggerPetstoreOpenApi310Client` with keyword arguments, and call `close()` when you are done. Every argument is optional; the full list is in the [SDK map](sdk-map.md).
52
+
53
+ ```python
54
+ from swagger_petstore_open_api_3_1_0 import SwaggerPetstoreOpenApi310Client
55
+
56
+ client = SwaggerPetstoreOpenApi310Client(petstore_auth="YOUR_API_KEY", api_key="YOUR_API_KEY")
57
+
58
+ # TODO: call endpoints here -- see api-reference.md
59
+
60
+ client.close()
61
+ ```
62
+
63
+ Alternatively, scope it -- `with SwaggerPetstoreOpenApi310Client(...) as client:` closes the pool on exit; see [Best Practices](#best-practices).
64
+
65
+ `Client` is exported as an alias of `SwaggerPetstoreOpenApi310Client`, so `from swagger_petstore_open_api_3_1_0 import Client` also works.
66
+
67
+ The SDK accepts every model-typed input in two interchangeable spellings, both type-checked: the typed model, or a plain dict with the same keys -- the `OrDict` and `Model | ModelDict` unions in the [SDK map](sdk-map.md). Pick whichever suits the call site: the dict form needs no import, while the model form adds a keyword-checked constructor and editor completion.
68
+
69
+ ### Asynchronous client
70
+
71
+ `AsyncSwaggerPetstoreOpenApi310Client` mirrors `SwaggerPetstoreOpenApi310Client` with **identical method names**, and every endpoint method is a coroutine. It takes the same arguments, with some differences -- for example, the transport argument is `custom_async_http_client`.
72
+
73
+ ```python
74
+ from asyncio import run
75
+
76
+ from swagger_petstore_open_api_3_1_0 import AsyncSwaggerPetstoreOpenApi310Client
77
+
78
+
79
+ async def main() -> None:
80
+ client = AsyncSwaggerPetstoreOpenApi310Client(petstore_auth="YOUR_API_KEY", api_key="YOUR_API_KEY")
81
+ # TODO: call endpoints here, awaiting each -- see api-reference.md
82
+ await client.aclose()
83
+
84
+
85
+ run(main())
86
+ ```
87
+
88
+ Alternatively, scope it -- `async with AsyncSwaggerPetstoreOpenApi310Client(...) as client:` closes the pool on exit. Only the async spelling is `aclose`, matching httpx2; see [Best Practices](#best-practices).
89
+
90
+ `AsyncClient` is the exported alias. Each client accepts **only** its own transport argument; passing the other's is a `TypeError` at runtime and an error under mypy.
91
+
92
+ ---
93
+
94
+ ## Usage
95
+
96
+ Two generated references cover the SDK; each answers a different question:
97
+
98
+ | Reference | For |
99
+ | --- | --- |
100
+ | **[API Reference](api-reference.md)** | Usage guidance for a single **parsed** operation: `client.<group>.<operation>(...)` returns the typed payload and raises `ApiError` on any non-2xx, with `.error` the typed error body, or `RawError` for a status the operation does not document. |
101
+ | **[Raw API Reference](raw-api-reference.md)** | The same for the **raw** variant: `client.<group>.with_raw_response.<operation>(...)` returns `ApiResult[T, E]` and never raises for an API error. |
102
+
103
+ Both API references carry every one of the 19 operations, with a sync and an async sample and a parameter table each.
104
+
105
+ ## SDK map
106
+
107
+ This SDK ships a generated **SDK map** -- [`sdk-map.md`](sdk-map.md) -- a deterministic, lookup-oriented table of contents of the SDK's Python surface, generated by APIMatic alongside this SDK.
108
+
109
+ Consult the map before scanning or grepping the source: it answers call-level contract questions by lookup, and for anything it does not carry -- model shapes, enum values, an endpoint's route or behavioural prose -- it names the one source file to read. How to read the map itself, including the SDK-wide defaults its rows rely on, is stated at the top of [`sdk-map.md`](sdk-map.md).
110
+
111
+ ## Best Practices
112
+
113
+ > [!TIP]
114
+ > Use a **single `SwaggerPetstoreOpenApi310Client` instance** for the lifetime of your application and reuse it across
115
+ > all requests. Each instance owns its own connection pool, so an instance per request forfeits
116
+ > connection reuse and leaks pools that are never closed.
117
+
118
+ Match the disposal to the client's lifetime: an application-lifetime client is closed once at shutdown with `close()` / `aclose()`; where the lifetime fits a block, `with SwaggerPetstoreOpenApi310Client() as client:` / `async with AsyncSwaggerPetstoreOpenApi310Client() as client:` releases it automatically. Both are idempotent, but a closed client is not reusable: the next call raises. The client closes **whatever transport it holds**, including one you supplied via `custom_http_client` / `custom_async_http_client`; if you intend to reuse your own transport across clients, don't hand its lifetime to a `with` block.
119
+
120
+ **Retries are on by default**: a failed idempotent request — a retryable status or no response at all — is sent again up to three times before the call gives up. Pass `retry_options=0` to turn it off, for instance in a test that stubs an error response; the policy and its defaults are under **Retries** in the SDK map.
121
+
122
+ ## License
123
+
124
+ This SDK is distributed under the [MIT License][license-url].
125
+
126
+ ---
127
+
128
+ ## Support
129
+
130
+ Refer to the [API reference](api-reference.md) for detailed information on available operations with code samples.
131
+
132
+ For further assistance, please contact support at apiteam@swagger.io.
133
+
134
+ ---
135
+
136
+ [license-url]: LICENSE
137
+ [license-badge]: https://img.shields.io/badge/License-MIT-blue.svg
138
+ [apimatic-url]: https://www.apimatic.io
139
+ [apimatic-badge]: https://www.apimatic.io/hubfs/Built-with-APIMatic-badge.svg
140
+ [python-url]: https://www.python.org/downloads/
141
+ [python-badge]: https://img.shields.io/badge/python-3.10%2B-blue.svg
@@ -0,0 +1,74 @@
1
+ [project]
2
+ name = "automated-package-publishing-sdk"
3
+ version = "0.1.1"
4
+ description = "wfgw"
5
+ authors = [
6
+ { name = "Package Publisher", email = "support@pp.org" },
7
+ ]
8
+ maintainers = [
9
+ { name = "APIMatic", email = "support@apimatic.io" },
10
+ ]
11
+ keywords = ["sdk", "api-client", "openapi", "rest", "http", "apimatic"]
12
+ license = "MIT"
13
+ readme = "README.md"
14
+ requires-python = ">=3.10"
15
+ dependencies = [
16
+ "httpx2 (>=2.13.1,<3.0.0)",
17
+ "certifi (>=2024.7.4)",
18
+ "pydantic[email] (>=2.11.0,<3.0.0)",
19
+ "typing-extensions (>=4.13.0,<5.0.0)",
20
+ ]
21
+
22
+ classifiers = [
23
+ "Intended Audience :: Developers",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Programming Language :: Python :: 3.13",
29
+ "Programming Language :: Python :: 3.14",
30
+ "Typing :: Typed",
31
+ "Operating System :: OS Independent",
32
+ "Topic :: Internet :: WWW/HTTP",
33
+ "Topic :: Software Development :: Libraries :: Python Modules",
34
+ ]
35
+
36
+ [project.urls]
37
+ Documentation = "https://docs.pp.org"
38
+
39
+ [dependency-groups]
40
+ dev = [
41
+ "mypy (>=2.2.0,<3.0.0)",
42
+ "ruff (>=0.14.14,<0.15.0)",
43
+ ]
44
+
45
+
46
+ [build-system]
47
+ requires = ["poetry-core>=2.2.0,<3.0.0"]
48
+ build-backend = "poetry.core.masonry.api"
49
+
50
+
51
+ [tool.poetry]
52
+ packages = [{ include = "swagger_petstore_open_api_3_1_0" }]
53
+
54
+
55
+ [tool.ruff]
56
+ line-length = 120
57
+
58
+ [tool.ruff.lint]
59
+ select = ["A", "E", "W", "F", "I", "UP", "B", "RUF"]
60
+ ignore = [
61
+ "RUF001", "RUF002", "RUF003",
62
+ ]
63
+
64
+ [tool.ruff.lint.per-file-ignores]
65
+ "**/__init__.py" = ["RUF022"] # curated, grouped __all__
66
+
67
+ [tool.mypy]
68
+ python_version = "3.10" # the supported floor, not whichever interpreter is local
69
+ files = ["swagger_petstore_open_api_3_1_0"]
70
+ strict = true
71
+ warn_unreachable = true
72
+ enable_error_code = ["redundant-expr", "truthy-bool", "ignore-without-code", "possibly-undefined"]
73
+ warn_return_any = true
74
+ pretty = true
@@ -0,0 +1,15 @@
1
+ from . import models
2
+ from .async_client import AsyncClient, AsyncSwaggerPetstoreOpenApi310Client
3
+ from .client import Client, SwaggerPetstoreOpenApi310Client
4
+ from .server import ServerConfig, ServerConfigDict, ServerConfigOrDict
5
+
6
+ __all__ = [
7
+ "models",
8
+ "AsyncClient",
9
+ "AsyncSwaggerPetstoreOpenApi310Client",
10
+ "Client",
11
+ "ServerConfig",
12
+ "ServerConfigDict",
13
+ "ServerConfigOrDict",
14
+ "SwaggerPetstoreOpenApi310Client",
15
+ ]
@@ -0,0 +1,5 @@
1
+ from .pet_api import AsyncPetApi, PetApi
2
+ from .store import AsyncStore, Store
3
+ from .user_api import AsyncUserApi, UserApi
4
+
5
+ __all__ = ["AsyncPetApi", "AsyncStore", "AsyncUserApi", "PetApi", "Store", "UserApi"]