Generate a Python client from an OpenAPI JSON document
Usage:
$ openapi-python-client [OPTIONS] COMMAND [ARGS]...
Options:
--version
: Print the version and exit [default: False]--install-completion
: Install completion for the current shell.--show-completion
: Show completion for the current shell, to copy it or customize the installation.--help
: Show this message and exit.
Commands:
generate
: Generate a new OpenAPI Client libraryupdate
: Update an existing OpenAPI Client library
Generate a new OpenAPI Client library
Usage:
$ openapi-python-client generate [OPTIONS]
Options:
--url TEXT
: A URL to read the JSON from--path PATH
: A path to the JSON file--custom-template-path DIRECTORY
: A path to a directory containing custom template(s)--meta [none|poetry|setup]
: The type of metadata you want to generate. [default: poetry]--file-encoding TEXT
: Encoding used when writing generated [default: utf-8]--config PATH
: Path to the config file to use--help
: Show this message and exit.
Update an existing OpenAPI Client library
Note: The
update
command performs the same operations asgenerate
except it does not overwrite specific metadata for the generated client such as theREADME.md
,.gitignore
, andpyproject.toml
.
Usage:
$ openapi-python-client update [OPTIONS]
Options:
--url TEXT
: A URL to read the JSON from--path PATH
: A path to the JSON file--custom-template-path DIRECTORY
: A path to a directory containing custom template(s)--meta [none|poetry|setup]
: The type of metadata you want to generate. [default: poetry]--file-encoding TEXT
: Encoding used when writing generated [default: utf-8]--config PATH
: Path to the config file to use--help
: Show this message and exit.