Generate loveable Python HTTP API Clients
MIT License
Published by phalt about 1 year ago
Published by phalt about 1 year ago
Published by phalt about 1 year ago
ruff format
for coding formatting (not the client output).Decimal
support now extends to Decimal input values.Published by phalt about 1 year ago
Decimal
types.Published by phalt about 1 year ago
constants.py
has been renamed to config.py
to better reflect how it is used. It is not generated from a template like the other files.typing.Unions
types will generate as the short hand |
instead.--regen t
or -r t
to the generate
command. This is automatically added to the line in MANIFEST.md
to help.clientele
command in the root directory of your project.generate-basic
. This can be used to keep a consistent file structure for an API that does not use OpenAPI.Published by phalt about 1 year ago
None
.Published by phalt about 1 year ago
from __future__ import annotations
in files to help with typing evaluation.Published by phalt about 1 year ago
http.py
file to handle this.put
methods did not generate input data correctly.Published by phalt about 1 year ago
constants.py
- thanks to @matthewknight for the contribution!CONTRIBUTORS.md
Published by phalt about 1 year ago
Published by phalt about 1 year ago
additional_headers()
is now applied to every client, allowing you to set up headers for all requests made by your client.http.APIException
. This object will have the response
attached to it for inspection by the developer.MANIFEST
is now renamed to MANIFEST.md
and will include install information for Clientele, as well as information on the command used to generate the client.Published by phalt about 1 year ago
Examples and documentation now includes a very complex example schema built using FastAPI that offers the following variations:
int
, str
, list
, dict
, references to other models, enums, and list
s of other models and enums.A huge test suite has been added to the CI pipeline for this project using a copy of the generated client from the schema above.
Published by phalt about 1 year ago
Enums
now inherit from str
as well so that they serialize to JSON properly. See this little nugget.Published by phalt about 1 year ago
model_rebuild
for complex schemas where there are nested schemas, his may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema.Published by phalt about 1 year ago
Published by phalt about 1 year ago
validate
command for validating an OpenAPI schema will work with clientele.version
command for showing the current version of clientele.dict
and list
instead of typing.Dict
and typing.List
respectively.Published by phalt about 1 year ago
Published by phalt over 1 year ago
lower_case_snake_case
).