pydantic-openapi-generator 2.2.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 (31) hide show
  1. pydantic_openapi_generator-2.2.8/.gitignore +218 -0
  2. pydantic_openapi_generator-2.2.8/LICENSE +21 -0
  3. pydantic_openapi_generator-2.2.8/PKG-INFO +141 -0
  4. pydantic_openapi_generator-2.2.8/README.md +115 -0
  5. pydantic_openapi_generator-2.2.8/pyproject.toml +123 -0
  6. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/__init__.py +17 -0
  7. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/__main__.py +85 -0
  8. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/common.py +58 -0
  9. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/generate_data.py +235 -0
  10. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/__init__.py +0 -0
  11. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/__init__.py +0 -0
  12. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/client_generator.py +495 -0
  13. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/common.py +58 -0
  14. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/exception_generator.py +23 -0
  15. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/generator.py +61 -0
  16. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/jinja_config.py +38 -0
  17. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/model_generator.py +1024 -0
  18. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/templates/alias_union.jinja2 +17 -0
  19. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/templates/async_client_httpx_pydantic_2.jinja2 +151 -0
  20. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/templates/discriminator_enum.jinja2 +7 -0
  21. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/templates/enum.jinja2 +11 -0
  22. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/templates/http_exception.jinja2 +8 -0
  23. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/templates/models.jinja2 +24 -0
  24. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/templates/models_pydantic_2.jinja2 +28 -0
  25. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/language_converters/python/templates/sync_client_httpx_pydantic_2.jinja2 +150 -0
  26. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/models.py +86 -0
  27. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/parsers/__init__.py +13 -0
  28. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/parsers/openapi_30.py +65 -0
  29. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/parsers/openapi_31.py +65 -0
  30. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/py.typed +0 -0
  31. pydantic_openapi_generator-2.2.8/src/pydantic_openapi_generator/version_detector.py +67 -0
@@ -0,0 +1,218 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.py[codz]
5
+ *$py.class
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ pip-wheel-metadata/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ *.py.cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ Pipfile.lock
97
+
98
+ # UV
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ uv.lock
103
+
104
+ # poetry
105
+ # For packages, we do not commit the lock file,
106
+ # since we are not controlling the environment,
107
+ # refer to https://python-poetry.org/docs/basic-usage/#as-a-library-developer
108
+ poetry.lock
109
+ poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ pdm.lock
116
+ pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+ /.idea/
165
+ /testclient/
166
+ /tests/test_result/
167
+ test_output/
168
+
169
+ # pytype static type analyzer
170
+ .pytype/
171
+
172
+ # Cython debug symbols
173
+ cython_debug/
174
+
175
+ # PyCharm
176
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
177
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
178
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
179
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
180
+ #.idea/
181
+
182
+ # Abstra
183
+ # Abstra is an AI-powered process automation framework.
184
+ # Ignore directories containing user credentials, local state, and settings.
185
+ # Learn more at https://abstra.io/docs
186
+ .abstra/
187
+
188
+ # Visual Studio Code
189
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
190
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
191
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
192
+ # you could uncomment the following to ignore the entire vscode folder
193
+ #.vscode/
194
+
195
+ # Ruff stuff:
196
+ .ruff_cache/
197
+
198
+ # PyPI configuration file
199
+ .pypirc
200
+
201
+ # Cursor
202
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
203
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
204
+ # refer to https://docs.cursor.com/context/ignore-files
205
+ .cursorignore
206
+ .cursorindexingignore
207
+
208
+ # Marimo
209
+ marimo/_static/
210
+ marimo/_lsp/
211
+ __marimo__/
212
+
213
+ # Streamlit
214
+ .streamlit/secrets.toml
215
+
216
+ # Generated Files
217
+ .DS_Store
218
+ openapi.json
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright © 2022 Marco Müllner
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,141 @@
1
+ Metadata-Version: 2.5
2
+ Name: pydantic-openapi-generator
3
+ Version: 2.2.8
4
+ Summary: Openapi Python Generator
5
+ Project-URL: Homepage, https://github.com/mattcoulter7/pydantic-openapi-generator
6
+ Project-URL: Repository, https://github.com/mattcoulter7/pydantic-openapi-generator
7
+ Project-URL: Documentation, https://github.com/mattcoulter7/pydantic-openapi-generator
8
+ Project-URL: Changelog, https://github.com/mattcoulter7/pydantic-openapi-generator/releases
9
+ Author-email: Marco Müllner <muellnermarco@gmail.com>, Matt Coulter <mattcoul7@gmail.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: Generator,OpenAPI,Python,async
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Requires-Python: <4,>=3.12
15
+ Requires-Dist: black>=21.10b0
16
+ Requires-Dist: click<9,>=8.1.3
17
+ Requires-Dist: httpx[all]<0.29,>=0.28.0
18
+ Requires-Dist: importlib-metadata<9,>=8.7.0
19
+ Requires-Dist: isort>=5.10.1
20
+ Requires-Dist: jinja2<4,>=3.1.2
21
+ Requires-Dist: openapi-pydantic<0.6,>=0.5.1
22
+ Requires-Dist: orjson<4,>=3.9.15
23
+ Requires-Dist: pydantic<3,>=2.10.2
24
+ Requires-Dist: pyyaml<7,>=6.0.2
25
+ Description-Content-Type: text/markdown
26
+
27
+ # Pydantic OpenAPI Generator
28
+
29
+ [![PyPI](https://img.shields.io/pypi/v/pydantic-openapi-generator.svg)][pypi_]
30
+ [![Status](https://img.shields.io/pypi/status/pydantic-openapi-generator.svg)][status]
31
+ [![Python Version](https://img.shields.io/pypi/pyversions/pydantic-openapi-generator)][python version]
32
+ [![License](https://img.shields.io/pypi/l/pydantic-openapi-generator)][license]
33
+
34
+ [![](https://img.shields.io/static/v1?label=documentation&message=enabled&color=<COLOR>)][documentation]
35
+ [![Tests](https://github.com/mattcoulter7/pydantic-openapi-generator/workflows/Tests/badge.svg)][tests]
36
+ [![Codecov](https://codecov.io/gh/mattcoulter7/pydantic-openapi-generator/branch/main/graph/badge.svg)][codecov]
37
+
38
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
39
+ [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]
40
+
41
+ [pypi_]: https://pypi.org/project/pydantic-openapi-generator/
42
+ [status]: https://pypi.org/project/pydantic-openapi-generator/
43
+ [python version]: https://pypi.org/project/pydantic-openapi-generator
44
+ [documentation]: https://github.com/mattcoulter7/pydantic-openapi-generator
45
+ [tests]: https://github.com/mattcoulter7/pydantic-openapi-generator/actions/workflows/ci.yaml
46
+ [codecov]: https://app.codecov.io/gh/mattcoulter7/pydantic-openapi-generator
47
+ [pre-commit]: https://github.com/pre-commit/pre-commit
48
+ [black]: https://github.com/psf/black
49
+
50
+ ![](logo.png)
51
+
52
+ ---
53
+ __Documentation:__ [here][documentation]
54
+
55
+ ---
56
+
57
+ ## Migration from auth-broker
58
+
59
+ As of `pydantic-openapi-generator` version `2.2.8`, this package has moved out
60
+ of the `auth-broker` organisation, been renamed, and had its import namespace
61
+ updated.
62
+
63
+ | Item | Previous | Current |
64
+ | --- | --- | --- |
65
+ | GitHub repository | [`auth-broker/openapi-python-generator`](https://github.com/auth-broker/openapi-python-generator) | [`mattcoulter7/pydantic-openapi-generator`](https://github.com/mattcoulter7/pydantic-openapi-generator) |
66
+ | PyPI package | [`ab-openapi-python-generator`](https://pypi.org/project/ab-openapi-python-generator/) | [`pydantic-openapi-generator`](https://pypi.org/project/pydantic-openapi-generator/) |
67
+ | CLI command | `ab-openapi-python-generator` | `pydantic-openapi-generator` |
68
+ | Import namespace | `ab_openapi_python_generator` | `pydantic_openapi_generator` |
69
+
70
+ The old PyPI package is retained as an archived historical package. New work
71
+ should use `pydantic-openapi-generator` and `pydantic_openapi_generator`.
72
+
73
+ ## Features
74
+
75
+ - __Ease of use__. Provide input, output and the library, and the generator will do the rest.
76
+ - __Type safety and type hinting.__ __Pydantic OpenAPI Generator__ makes heavy use of pydantic models to provide type-safe data structures.
77
+ - __Support for multiple rest frameworks.__ __Pydantic OpenAPI Generator__ currently supports the following:
78
+ - [httpx](https://pypi.org/project/httpx/)
79
+ - [requests](https://pypi.org/project/requests/)
80
+ - [aiohttp](https://pypi.org/project/aiohttp/)
81
+ - __Async and sync code generation support__, depending on the framework. It will automatically create both for frameworks that support both.
82
+ - __Easily extendable using Jinja2 templates__. The code is designed to be easily extendable and should support even more languages and frameworks in the future.
83
+ - __Fully tested__. Every generated code is automatically tested against the OpenAPI spec and we have 100% coverage.
84
+ - __Usage as CLI or as library__.
85
+
86
+ ## Requirements
87
+
88
+ - Python 3.12+
89
+
90
+ ## Installation
91
+
92
+ You can install _Pydantic OpenAPI Generator_ via [pip] from [PyPI]:
93
+
94
+ ```console
95
+ $ pip install pydantic-openapi-generator
96
+ ```
97
+
98
+ ## Usage
99
+
100
+ Please see the [Quick start page] for details.
101
+
102
+ ## Roadmap
103
+
104
+ - Support for all commonly used http libraries in the python ecosystem (~~requests~~, urllib, ...)
105
+ - Support for multiple languages
106
+ - Support for multiple authentication schemes
107
+ - Support custom themes
108
+
109
+ ## Contributing
110
+
111
+ Contributions are very welcome.
112
+ To learn more, see the [Contributor Guide].
113
+
114
+ ## License
115
+
116
+ Distributed under the terms of the [MIT license][license],
117
+ _Openapi Python Generator_ is free and open source software.
118
+
119
+ ## Issues
120
+
121
+ If you encounter any problems,
122
+ please [file an issue] along with a detailed description.
123
+
124
+ ## Credits
125
+
126
+ Special thanks to the peeps from [openapi-schema-pydantic](https://github.com/kuimono/openapi-schema-pydantic),
127
+ which already did a lot of the legwork by providing a pydantic schema for the OpenAPI 3.0.0+ specification.
128
+
129
+ This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.
130
+
131
+ [@cjolowicz]: https://github.com/cjolowicz
132
+ [pypi]: https://pypi.org/
133
+ [hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
134
+ [file an issue]: https://github.com/mattcoulter7/pydantic-openapi-generator/issues
135
+ [pip]: https://pip.pypa.io/
136
+
137
+ <!-- github-only -->
138
+
139
+ [license]: https://github.com/mattcoulter7/pydantic-openapi-generator/blob/main/LICENSE
140
+ [contributor guide]: https://github.com/mattcoulter7/pydantic-openapi-generator/blob/main/CONTRIBUTING.md
141
+ [Quick start page]: https://github.com/mattcoulter7/pydantic-openapi-generator#usage
@@ -0,0 +1,115 @@
1
+ # Pydantic OpenAPI Generator
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/pydantic-openapi-generator.svg)][pypi_]
4
+ [![Status](https://img.shields.io/pypi/status/pydantic-openapi-generator.svg)][status]
5
+ [![Python Version](https://img.shields.io/pypi/pyversions/pydantic-openapi-generator)][python version]
6
+ [![License](https://img.shields.io/pypi/l/pydantic-openapi-generator)][license]
7
+
8
+ [![](https://img.shields.io/static/v1?label=documentation&message=enabled&color=<COLOR>)][documentation]
9
+ [![Tests](https://github.com/mattcoulter7/pydantic-openapi-generator/workflows/Tests/badge.svg)][tests]
10
+ [![Codecov](https://codecov.io/gh/mattcoulter7/pydantic-openapi-generator/branch/main/graph/badge.svg)][codecov]
11
+
12
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
13
+ [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]
14
+
15
+ [pypi_]: https://pypi.org/project/pydantic-openapi-generator/
16
+ [status]: https://pypi.org/project/pydantic-openapi-generator/
17
+ [python version]: https://pypi.org/project/pydantic-openapi-generator
18
+ [documentation]: https://github.com/mattcoulter7/pydantic-openapi-generator
19
+ [tests]: https://github.com/mattcoulter7/pydantic-openapi-generator/actions/workflows/ci.yaml
20
+ [codecov]: https://app.codecov.io/gh/mattcoulter7/pydantic-openapi-generator
21
+ [pre-commit]: https://github.com/pre-commit/pre-commit
22
+ [black]: https://github.com/psf/black
23
+
24
+ ![](logo.png)
25
+
26
+ ---
27
+ __Documentation:__ [here][documentation]
28
+
29
+ ---
30
+
31
+ ## Migration from auth-broker
32
+
33
+ As of `pydantic-openapi-generator` version `2.2.8`, this package has moved out
34
+ of the `auth-broker` organisation, been renamed, and had its import namespace
35
+ updated.
36
+
37
+ | Item | Previous | Current |
38
+ | --- | --- | --- |
39
+ | GitHub repository | [`auth-broker/openapi-python-generator`](https://github.com/auth-broker/openapi-python-generator) | [`mattcoulter7/pydantic-openapi-generator`](https://github.com/mattcoulter7/pydantic-openapi-generator) |
40
+ | PyPI package | [`ab-openapi-python-generator`](https://pypi.org/project/ab-openapi-python-generator/) | [`pydantic-openapi-generator`](https://pypi.org/project/pydantic-openapi-generator/) |
41
+ | CLI command | `ab-openapi-python-generator` | `pydantic-openapi-generator` |
42
+ | Import namespace | `ab_openapi_python_generator` | `pydantic_openapi_generator` |
43
+
44
+ The old PyPI package is retained as an archived historical package. New work
45
+ should use `pydantic-openapi-generator` and `pydantic_openapi_generator`.
46
+
47
+ ## Features
48
+
49
+ - __Ease of use__. Provide input, output and the library, and the generator will do the rest.
50
+ - __Type safety and type hinting.__ __Pydantic OpenAPI Generator__ makes heavy use of pydantic models to provide type-safe data structures.
51
+ - __Support for multiple rest frameworks.__ __Pydantic OpenAPI Generator__ currently supports the following:
52
+ - [httpx](https://pypi.org/project/httpx/)
53
+ - [requests](https://pypi.org/project/requests/)
54
+ - [aiohttp](https://pypi.org/project/aiohttp/)
55
+ - __Async and sync code generation support__, depending on the framework. It will automatically create both for frameworks that support both.
56
+ - __Easily extendable using Jinja2 templates__. The code is designed to be easily extendable and should support even more languages and frameworks in the future.
57
+ - __Fully tested__. Every generated code is automatically tested against the OpenAPI spec and we have 100% coverage.
58
+ - __Usage as CLI or as library__.
59
+
60
+ ## Requirements
61
+
62
+ - Python 3.12+
63
+
64
+ ## Installation
65
+
66
+ You can install _Pydantic OpenAPI Generator_ via [pip] from [PyPI]:
67
+
68
+ ```console
69
+ $ pip install pydantic-openapi-generator
70
+ ```
71
+
72
+ ## Usage
73
+
74
+ Please see the [Quick start page] for details.
75
+
76
+ ## Roadmap
77
+
78
+ - Support for all commonly used http libraries in the python ecosystem (~~requests~~, urllib, ...)
79
+ - Support for multiple languages
80
+ - Support for multiple authentication schemes
81
+ - Support custom themes
82
+
83
+ ## Contributing
84
+
85
+ Contributions are very welcome.
86
+ To learn more, see the [Contributor Guide].
87
+
88
+ ## License
89
+
90
+ Distributed under the terms of the [MIT license][license],
91
+ _Openapi Python Generator_ is free and open source software.
92
+
93
+ ## Issues
94
+
95
+ If you encounter any problems,
96
+ please [file an issue] along with a detailed description.
97
+
98
+ ## Credits
99
+
100
+ Special thanks to the peeps from [openapi-schema-pydantic](https://github.com/kuimono/openapi-schema-pydantic),
101
+ which already did a lot of the legwork by providing a pydantic schema for the OpenAPI 3.0.0+ specification.
102
+
103
+ This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.
104
+
105
+ [@cjolowicz]: https://github.com/cjolowicz
106
+ [pypi]: https://pypi.org/
107
+ [hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
108
+ [file an issue]: https://github.com/mattcoulter7/pydantic-openapi-generator/issues
109
+ [pip]: https://pip.pypa.io/
110
+
111
+ <!-- github-only -->
112
+
113
+ [license]: https://github.com/mattcoulter7/pydantic-openapi-generator/blob/main/LICENSE
114
+ [contributor guide]: https://github.com/mattcoulter7/pydantic-openapi-generator/blob/main/CONTRIBUTING.md
115
+ [Quick start page]: https://github.com/mattcoulter7/pydantic-openapi-generator#usage
@@ -0,0 +1,123 @@
1
+ [project]
2
+ name = "pydantic-openapi-generator"
3
+ version = "2.2.8"
4
+ description = "Openapi Python Generator"
5
+ authors = [
6
+ { name = "Marco Müllner", email = "muellnermarco@gmail.com" },
7
+ { name = "Matt Coulter", email = "mattcoul7@gmail.com" },
8
+ ]
9
+ requires-python = ">=3.12,<4"
10
+ readme = "README.md"
11
+ license = "MIT"
12
+ keywords = [
13
+ "OpenAPI",
14
+ "Generator",
15
+ "Python",
16
+ "async",
17
+ ]
18
+ classifiers = ["Development Status :: 3 - Alpha"]
19
+ dependencies = [
20
+ "httpx[all]>=0.28.0,<0.29",
21
+ "pydantic>=2.10.2,<3",
22
+ "orjson>=3.9.15,<4",
23
+ "Jinja2>=3.1.2,<4",
24
+ "click>=8.1.3,<9",
25
+ "black>=21.10b0",
26
+ "isort>=5.10.1",
27
+ "openapi-pydantic>=0.5.1,<0.6",
28
+ "pyyaml>=6.0.2,<7",
29
+ "importlib-metadata>=8.7.0,<9",
30
+ ]
31
+
32
+ [project.urls]
33
+ Homepage = "https://github.com/mattcoulter7/pydantic-openapi-generator"
34
+ Repository = "https://github.com/mattcoulter7/pydantic-openapi-generator"
35
+ Documentation = "https://github.com/mattcoulter7/pydantic-openapi-generator"
36
+ Changelog = "https://github.com/mattcoulter7/pydantic-openapi-generator/releases"
37
+
38
+ [project.scripts]
39
+ pydantic-openapi-generator = "pydantic_openapi_generator.__main__:main"
40
+
41
+ [dependency-groups]
42
+ dev = [
43
+ "debugpy>=1.8.14,<2",
44
+ "isort>=6.0.1,<7",
45
+ "Pygments>=2.10.0",
46
+ "coverage[toml]>=7.10.0,<8",
47
+ "darglint>=1.8.1",
48
+ "ruff>=0.12.12,<0.17",
49
+ "furo>=2021.11.12",
50
+ "ty>=0.0.1a20,<0.0.2",
51
+ "pep8-naming>=0.10.1",
52
+ "pre-commit>=2.16.0",
53
+ "pre-commit-hooks>=4.1.0",
54
+ "pytest>=6.2.5",
55
+ "pyupgrade>=2.29.1",
56
+ "safety>=1.10.3",
57
+ "typeguard>=2.13.3",
58
+ "xdoctest[colors]>=0.15.10",
59
+ "myst-parser>=0.16.1",
60
+ "pytest-cov>=7.1.0,<8",
61
+ "pytest-asyncio>=1.4.0,<2",
62
+ "fastapi>=0.115.5,<0.116",
63
+ "uvicorn>=0.18.1,<0.19",
64
+ "respx>=0.22.0,<0.23",
65
+ "aiohttp>=3.8.3,<4",
66
+ "responses>=0.25.8,<0.26"
67
+ ]
68
+
69
+ [build-system]
70
+ requires = ["hatchling"]
71
+ build-backend = "hatchling.build"
72
+
73
+ [tool.hatch.build.targets.sdist]
74
+ include = ["src/pydantic_openapi_generator"]
75
+
76
+ [tool.hatch.build.targets.wheel]
77
+ packages = ["src/pydantic_openapi_generator"]
78
+
79
+
80
+ [tool.coverage.paths]
81
+ source = ["src", "*/site-packages"]
82
+ tests = ["tests", "*/tests"]
83
+
84
+ [tool.coverage.run]
85
+ branch = true
86
+ source = ["pydantic_openapi_generator", "tests"]
87
+
88
+ [tool.coverage.report]
89
+ show_missing = true
90
+ fail_under = 100
91
+
92
+ [tool.isort]
93
+ profile = "black"
94
+ force_single_line = true
95
+ lines_after_imports = 2
96
+
97
+ [tool.mypy]
98
+ strict = true
99
+ warn_unreachable = true
100
+ pretty = true
101
+ show_column_numbers = true
102
+ show_error_codes = true
103
+ show_error_context = true
104
+
105
+ [tool.ruff]
106
+ exclude = ["tests/*"]
107
+ line-length = 120
108
+
109
+ [tool.ruff.lint]
110
+ ignore = ["E501"]
111
+ select = [
112
+ "B",
113
+ "B9",
114
+ "C",
115
+ "E",
116
+ "F",
117
+ "I",
118
+ "S",
119
+ "W",
120
+ ]
121
+
122
+ [tool.ruff.lint.mccabe]
123
+ max-complexity = 25
@@ -0,0 +1,17 @@
1
+ """Python client from an OPENAPI 3.0+ specification in seconds."""
2
+
3
+ try:
4
+ from importlib.metadata import (
5
+ PackageNotFoundError, # type: ignore
6
+ version,
7
+ )
8
+ except ImportError: # pragma: no cover
9
+ from importlib_metadata import (
10
+ PackageNotFoundError, # type: ignore
11
+ version, # type: ignore
12
+ )
13
+
14
+ try:
15
+ __version__ = version(__name__)
16
+ except PackageNotFoundError: # pragma: no cover
17
+ __version__ = "unknown"