cliV1 0.0.8__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 (87) hide show
  1. cliv1-0.0.8/LICENSE +21 -0
  2. cliv1-0.0.8/PKG-INFO +168 -0
  3. cliv1-0.0.8/README.md +139 -0
  4. cliv1-0.0.8/pyproject.toml +73 -0
  5. cliv1-0.0.8/swagger_petstore_open_api_3_0/__init__.py +15 -0
  6. cliv1-0.0.8/swagger_petstore_open_api_3_0/apis/__init__.py +5 -0
  7. cliv1-0.0.8/swagger_petstore_open_api_3_0/apis/pet_api.py +883 -0
  8. cliv1-0.0.8/swagger_petstore_open_api_3_0/apis/store.py +413 -0
  9. cliv1-0.0.8/swagger_petstore_open_api_3_0/apis/user_api.py +794 -0
  10. cliv1-0.0.8/swagger_petstore_open_api_3_0/async_client.py +79 -0
  11. cliv1-0.0.8/swagger_petstore_open_api_3_0/auth.py +17 -0
  12. cliv1-0.0.8/swagger_petstore_open_api_3_0/base_client.py +18 -0
  13. cliv1-0.0.8/swagger_petstore_open_api_3_0/client.py +77 -0
  14. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/__init__.py +358 -0
  15. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/_internal/__init__.py +9 -0
  16. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/_internal/content_disposition.py +154 -0
  17. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/_internal/flattening.py +139 -0
  18. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/_internal/headers.py +144 -0
  19. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/_internal/sse_parser.py +124 -0
  20. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/_internal/subscripts.py +50 -0
  21. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/_internal/urls.py +186 -0
  22. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/_internal/wire.py +198 -0
  23. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/adapters.py +177 -0
  24. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/__init__.py +70 -0
  25. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/composition.py +175 -0
  26. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/models.py +216 -0
  27. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/protocols.py +103 -0
  28. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/schemes/__init__.py +94 -0
  29. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/schemes/api_key_auth.py +53 -0
  30. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/schemes/basic_auth.py +73 -0
  31. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/schemes/bearer_auth.py +21 -0
  32. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/schemes/oauth2_authorization_code.py +393 -0
  33. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/schemes/oauth2_client_credentials.py +127 -0
  34. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/schemes/oauth2_password.py +142 -0
  35. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/auth/schemes/oauth2_schemes.py +300 -0
  36. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/base_raw_response.py +49 -0
  37. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/bodies.py +550 -0
  38. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/converters/__init__.py +68 -0
  39. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/converters/date_time.py +237 -0
  40. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/converters/encoded_bytes.py +273 -0
  41. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/converters/open_enum.py +35 -0
  42. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/decoding.py +498 -0
  43. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/discriminators.py +129 -0
  44. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/event_streams.py +225 -0
  45. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/exceptions.py +38 -0
  46. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/file_responses.py +335 -0
  47. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/files.py +173 -0
  48. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/httpx_transport.py +748 -0
  49. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/models.py +143 -0
  50. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/optionality.py +130 -0
  51. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/params.py +157 -0
  52. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/raw_client.py +338 -0
  53. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/request_options.py +94 -0
  54. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/results.py +123 -0
  55. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/runtime_env.py +43 -0
  56. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/servers.py +33 -0
  57. cliv1-0.0.8/swagger_petstore_open_api_3_0/core/transport.py +191 -0
  58. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/__init__.py +48 -0
  59. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/add_pet_error.py +21 -0
  60. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/delete_order_error.py +21 -0
  61. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/delete_pet_error.py +21 -0
  62. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/delete_user_error.py +21 -0
  63. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/find_pets_by_status_error.py +21 -0
  64. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/find_pets_by_tags_error.py +21 -0
  65. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/get_order_by_id_error.py +21 -0
  66. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/get_pet_by_id_error.py +21 -0
  67. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/get_user_by_name_error.py +21 -0
  68. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/login_user_error.py +21 -0
  69. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/place_order_error.py +21 -0
  70. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/update_pet_error.py +21 -0
  71. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/update_pet_with_form_error.py +21 -0
  72. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/update_user_error.py +21 -0
  73. cliv1-0.0.8/swagger_petstore_open_api_3_0/errors/upload_file_error.py +21 -0
  74. cliv1-0.0.8/swagger_petstore_open_api_3_0/models/__init__.py +23 -0
  75. cliv1-0.0.8/swagger_petstore_open_api_3_0/models/api_response.py +18 -0
  76. cliv1-0.0.8/swagger_petstore_open_api_3_0/models/category.py +15 -0
  77. cliv1-0.0.8/swagger_petstore_open_api_3_0/models/enums/__init__.py +4 -0
  78. cliv1-0.0.8/swagger_petstore_open_api_3_0/models/enums/order_status.py +17 -0
  79. cliv1-0.0.8/swagger_petstore_open_api_3_0/models/enums/pet_status.py +17 -0
  80. cliv1-0.0.8/swagger_petstore_open_api_3_0/models/order.py +27 -0
  81. cliv1-0.0.8/swagger_petstore_open_api_3_0/models/pet.py +28 -0
  82. cliv1-0.0.8/swagger_petstore_open_api_3_0/models/tag_model.py +15 -0
  83. cliv1-0.0.8/swagger_petstore_open_api_3_0/models/user.py +29 -0
  84. cliv1-0.0.8/swagger_petstore_open_api_3_0/py.typed +0 -0
  85. cliv1-0.0.8/swagger_petstore_open_api_3_0/server/__init__.py +21 -0
  86. cliv1-0.0.8/swagger_petstore_open_api_3_0/server/server.py +17 -0
  87. cliv1-0.0.8/swagger_petstore_open_api_3_0/server/server_config.py +52 -0
cliv1-0.0.8/LICENSE ADDED
@@ -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.
cliv1-0.0.8/PKG-INFO ADDED
@@ -0,0 +1,168 @@
1
+ Metadata-Version: 2.4
2
+ Name: cliV1
3
+ Version: 0.0.8
4
+ Summary: The official Python library for the Swagger Petstore - OpenAPI 3.0 API
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Keywords: sdk,api-client,openapi,rest,http,apimatic
8
+ Author: apiteam@swagger.io
9
+ Maintainer: APIMatic
10
+ Maintainer-email: support@apimatic.io
11
+ Requires-Python: >=3.10
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Typing :: Typed
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Topic :: Internet :: WWW/HTTP
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Dist: httpx (>=0.28.1,<1.0.0)
24
+ Requires-Dist: pydantic[email] (>=2.11.0,<3.0.0)
25
+ Requires-Dist: typing-extensions (>=4.13.0,<5.0.0)
26
+ Project-URL: Documentation, https://swagger.io
27
+ Description-Content-Type: text/markdown
28
+
29
+ # Swagger Petstore - OpenAPI 3.0 SDK
30
+
31
+ [![Built with APIMatic][apimatic-badge]][apimatic-url] [![License: MIT][license-badge]][license-url] [![Python 3.10+][python-badge]][python-url]
32
+
33
+ The Swagger Petstore - OpenAPI 3.0 SDK for Python provides access to the [Swagger Petstore - OpenAPI 3.0 REST APIs](https://swagger.io) from Python applications.
34
+
35
+ > [!TIP]
36
+ > **Looking for a specific signature, model, enum, or error type?** This SDK ships a generated
37
+ > **[SDK map](sdk-map.md)** -- a lookup index of the SDK's entire Python surface. Consult it before
38
+ > scanning the source tree; details under [SDK map](#sdk-map).
39
+
40
+ This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about
41
+ Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!
42
+ You can now help us improve the API whether it's by making changes to the definition itself or to the code.
43
+ That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
44
+
45
+ Some useful links:
46
+ - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
47
+ - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
48
+
49
+ ---
50
+
51
+ ## Installation
52
+
53
+ Once the distribution is published, install the Python SDK from PyPI, with whichever package manager your project uses:
54
+
55
+ ```bash
56
+ pip install cliV1
57
+ ```
58
+
59
+ ```bash
60
+ uv add cliV1
61
+ ```
62
+
63
+ ```bash
64
+ poetry add cliV1
65
+ ```
66
+
67
+ 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:
68
+
69
+ ```bash
70
+ pip install <path-to-sdk>
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Quick Start
76
+
77
+ ### Synchronous client
78
+
79
+ Construct `SwaggerPetstoreOpenApi30Client` 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).
80
+
81
+ ```python
82
+ from swagger_petstore_open_api_3_0 import SwaggerPetstoreOpenApi30Client
83
+
84
+ client = SwaggerPetstoreOpenApi30Client(petstore_auth="YOUR_API_KEY", api_key="YOUR_API_KEY")
85
+
86
+ # TODO: call endpoints here -- see api-reference.md
87
+
88
+ client.close()
89
+ ```
90
+
91
+ Alternatively, scope it -- `with SwaggerPetstoreOpenApi30Client(...) as client:` closes the pool on exit; see [Best Practices](#best-practices).
92
+
93
+ `Client` is exported as an alias of `SwaggerPetstoreOpenApi30Client`, so `from swagger_petstore_open_api_3_0 import Client` also works.
94
+
95
+ 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.
96
+
97
+ ### Asynchronous client
98
+
99
+ `AsyncSwaggerPetstoreOpenApi30Client` mirrors `SwaggerPetstoreOpenApi30Client` 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`.
100
+
101
+ ```python
102
+ from asyncio import run
103
+
104
+ from swagger_petstore_open_api_3_0 import AsyncSwaggerPetstoreOpenApi30Client
105
+
106
+
107
+ async def main() -> None:
108
+ client = AsyncSwaggerPetstoreOpenApi30Client(petstore_auth="YOUR_API_KEY", api_key="YOUR_API_KEY")
109
+ # TODO: call endpoints here, awaiting each -- see api-reference.md
110
+ await client.aclose()
111
+
112
+
113
+ run(main())
114
+ ```
115
+
116
+ Alternatively, scope it -- `async with AsyncSwaggerPetstoreOpenApi30Client(...) as client:` closes the pool on exit. Only the async spelling is `aclose`, matching httpx; see [Best Practices](#best-practices).
117
+
118
+ `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.
119
+
120
+ ---
121
+
122
+ ## Usage
123
+
124
+ Two generated references cover the SDK; each answers a different question:
125
+
126
+ | Reference | For |
127
+ | --- | --- |
128
+ | **[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. |
129
+ | **[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. |
130
+
131
+ Both API references carry every one of the 19 operations, with a sync and an async sample and a parameter table each.
132
+
133
+ ## SDK map
134
+
135
+ 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.
136
+
137
+ 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).
138
+
139
+ ## Best Practices
140
+
141
+ > [!TIP]
142
+ > Use a **single `SwaggerPetstoreOpenApi30Client` instance** for the lifetime of your application and reuse it across
143
+ > all requests. Each instance owns its own connection pool, so an instance per request forfeits
144
+ > connection reuse and leaks pools that are never closed.
145
+
146
+ 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 SwaggerPetstoreOpenApi30Client() as client:` / `async with AsyncSwaggerPetstoreOpenApi30Client() 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.
147
+
148
+ ## License
149
+
150
+ This SDK is distributed under the [MIT License][license-url].
151
+
152
+ ---
153
+
154
+ ## Support
155
+
156
+ Refer to the [API reference](api-reference.md) for detailed information on available operations with code samples.
157
+
158
+ For further assistance, please contact support at apiteam@swagger.io.
159
+
160
+ ---
161
+
162
+ [license-url]: LICENSE
163
+ [license-badge]: https://img.shields.io/badge/License-MIT-blue.svg
164
+ [apimatic-url]: https://www.apimatic.io
165
+ [apimatic-badge]: https://www.apimatic.io/hubfs/Built-with-APIMatic-badge.svg
166
+ [python-url]: https://www.python.org/downloads/
167
+ [python-badge]: https://img.shields.io/badge/python-3.10%2B-blue.svg
168
+
cliv1-0.0.8/README.md ADDED
@@ -0,0 +1,139 @@
1
+ # Swagger Petstore - OpenAPI 3.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.0 SDK for Python provides access to the [Swagger Petstore - OpenAPI 3.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.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
+ Once the distribution is published, install the Python SDK from PyPI, with whichever package manager your project uses:
26
+
27
+ ```bash
28
+ pip install cliV1
29
+ ```
30
+
31
+ ```bash
32
+ uv add cliV1
33
+ ```
34
+
35
+ ```bash
36
+ poetry add cliV1
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 `SwaggerPetstoreOpenApi30Client` 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_0 import SwaggerPetstoreOpenApi30Client
55
+
56
+ client = SwaggerPetstoreOpenApi30Client(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 SwaggerPetstoreOpenApi30Client(...) as client:` closes the pool on exit; see [Best Practices](#best-practices).
64
+
65
+ `Client` is exported as an alias of `SwaggerPetstoreOpenApi30Client`, so `from swagger_petstore_open_api_3_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
+ `AsyncSwaggerPetstoreOpenApi30Client` mirrors `SwaggerPetstoreOpenApi30Client` 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_0 import AsyncSwaggerPetstoreOpenApi30Client
77
+
78
+
79
+ async def main() -> None:
80
+ client = AsyncSwaggerPetstoreOpenApi30Client(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 AsyncSwaggerPetstoreOpenApi30Client(...) as client:` closes the pool on exit. Only the async spelling is `aclose`, matching httpx; 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 `SwaggerPetstoreOpenApi30Client` 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 SwaggerPetstoreOpenApi30Client() as client:` / `async with AsyncSwaggerPetstoreOpenApi30Client() 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
+ ## License
121
+
122
+ This SDK is distributed under the [MIT License][license-url].
123
+
124
+ ---
125
+
126
+ ## Support
127
+
128
+ Refer to the [API reference](api-reference.md) for detailed information on available operations with code samples.
129
+
130
+ For further assistance, please contact support at apiteam@swagger.io.
131
+
132
+ ---
133
+
134
+ [license-url]: LICENSE
135
+ [license-badge]: https://img.shields.io/badge/License-MIT-blue.svg
136
+ [apimatic-url]: https://www.apimatic.io
137
+ [apimatic-badge]: https://www.apimatic.io/hubfs/Built-with-APIMatic-badge.svg
138
+ [python-url]: https://www.python.org/downloads/
139
+ [python-badge]: https://img.shields.io/badge/python-3.10%2B-blue.svg
@@ -0,0 +1,73 @@
1
+ [project]
2
+ name = "cliV1"
3
+ version = "0.0.8"
4
+ description = "The official Python library for the Swagger Petstore - OpenAPI 3.0 API"
5
+ authors = [
6
+ { email = "apiteam@swagger.io" },
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
+ "httpx (>=0.28.1,<1.0.0)",
17
+ "pydantic[email] (>=2.11.0,<3.0.0)",
18
+ "typing-extensions (>=4.13.0,<5.0.0)",
19
+ ]
20
+
21
+ classifiers = [
22
+ "Intended Audience :: Developers",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Python :: 3.13",
28
+ "Programming Language :: Python :: 3.14",
29
+ "Typing :: Typed",
30
+ "Operating System :: OS Independent",
31
+ "Topic :: Internet :: WWW/HTTP",
32
+ "Topic :: Software Development :: Libraries :: Python Modules",
33
+ ]
34
+
35
+ [project.urls]
36
+ "Documentation" = "https://swagger.io"
37
+
38
+ [dependency-groups]
39
+ dev = [
40
+ "mypy (>=2.2.0,<3.0.0)",
41
+ "ruff (>=0.14.14,<0.15.0)",
42
+ ]
43
+
44
+
45
+ [build-system]
46
+ requires = ["poetry-core>=2.2.0,<3.0.0"]
47
+ build-backend = "poetry.core.masonry.api"
48
+
49
+
50
+ [tool.poetry]
51
+ packages = [{ include = "swagger_petstore_open_api_3_0" }]
52
+
53
+
54
+ [tool.ruff]
55
+ line-length = 120
56
+
57
+ [tool.ruff.lint]
58
+ select = ["A", "E", "W", "F", "I", "UP", "B", "RUF"]
59
+ ignore = [
60
+ "RUF001", "RUF002", "RUF003",
61
+ ]
62
+
63
+ [tool.ruff.lint.per-file-ignores]
64
+ "**/__init__.py" = ["RUF022"] # curated, grouped __all__
65
+
66
+ [tool.mypy]
67
+ python_version = "3.10" # the supported floor, not whichever interpreter is local
68
+ files = ["swagger_petstore_open_api_3_0"]
69
+ strict = true
70
+ warn_unreachable = true
71
+ enable_error_code = ["redundant-expr", "truthy-bool", "ignore-without-code", "possibly-undefined"]
72
+ warn_return_any = true
73
+ pretty = true
@@ -0,0 +1,15 @@
1
+ from . import models
2
+ from .async_client import AsyncClient, AsyncSwaggerPetstoreOpenApi30Client
3
+ from .client import Client, SwaggerPetstoreOpenApi30Client
4
+ from .server import ServerConfig, ServerConfigDict, ServerConfigOrDict
5
+
6
+ __all__ = [
7
+ "models",
8
+ "AsyncClient",
9
+ "AsyncSwaggerPetstoreOpenApi30Client",
10
+ "Client",
11
+ "ServerConfig",
12
+ "ServerConfigDict",
13
+ "ServerConfigOrDict",
14
+ "SwaggerPetstoreOpenApi30Client",
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"]