| [ Web Proxy ] |
| Viewing: https://marcomuellner.github.io/openapi-python-generator/quick_start/ | [Back] [Original] |
Make sure you have the latest version of openapi-python-generator installed.
To call the generator, simply pass the OpenAPI spec (as a link or to a file), and an output folder. Optionally you can also pass the library you would like to use.
This will generate a folder called testclient, with the following structure (using the file above):
- models
- __init__.py
- HTTPValidationError.py
- RootResponse.py
- Team.py
- User.py
- ValidationError.py
- EnumComponent.py
- services
- __init__.py
- async_general_service.py
- general_service.py
- __init__.py
- api_config.py
To use it, simply import the module and call the functions:
from testclient import root__get
root__get() # Returns a RootResponse object
If you'd like more info, do check out our Tutorial or the API Reference.
| Web Proxy Viewer | New URL | Original Page |