Clientele

Latest version: v0.8.3

Safety actively analyzes 638819 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

0.4.4

Examples and documentation now includes a very complex example schema built using [FastAPI](https://fastapi.tiangolo.com/) that offers the following variations:

* Simple request / response (no input just an output)
* A request with a URL/Path parameter.
* Models with `int`, `str`, `list`, `dict`, references to other models, enums, and `list`s of other models and enums.
* A request with query parameters.
* A response model that has optional parameters.
* An HTTP POST request that takes an input model.
* An HTTP POST request that takes path parameters and also an input model.
* An HTTP GET request that requires an HTTP header, and returns it.
* An HTTP GET endpoint that returns the HTTP bearer authorization token (also makes clientele generate the http authentication for this schema).

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.

0.4.3

* `Enums` now inherit from `str` as well so that they serialize to JSON properly. See [this little nugget](https://hultner.se/quickbits/2018-03-12-python-json-serializable-enum.html).

0.4.2

* Correctly use `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.
* Do not raise for status, instead attempt to return the response if it cannot match a response type.

0.4.1

* Correctly generate lists of nested schema classes
* Correctly build response schemas that are emphemeral (such as when they just return an array of other schemas, or when they have no $ref).

0.4.0

* Change install suggestion to use [pipx](https://github.com/pypa/pipx) as it works best as a global CLI tool.
* Improved support for OpenAPI 3.0.3 schemas (a test version is available in the example_openapi_specs directory).
* `validate` command for validating an OpenAPI schema will work with clientele.
* `version` command for showing the current version of clientele.
* Supports HTTP DELETE methods.
* Big refactor of how methods are generated to reduce duplicate code.
* Support optional header parameters in all request functions (where they are required).
* Very simple Oauth2 support - if it is discovered will set up HTTP Bearer auth for you.
* Uses `dict` and `list` instead of `typing.Dict` and `typing.List` respectively.
* Improved schema generation when schemas have $ref to other models.

0.3.2

* Minor changes to function name generation to make it more consistent.
* Optional parameters in schemas are working properly.

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.