openapi-transmog
A simple development tool (not a dependency!) that transforms an OpenAPI specification into a single .py file that encapsulates its function calls and return types (as TypedDicts).
The .py file outputted requires Python 3.8 or later, requests, and (optionally) python-dotenv.
Be aware this tool is early in development: it will make a lot of assumptions that likely will not hold for your particular API spec!
Usage
While the header must be passed along, it doesn't specify where you are getting certain variables. As such, you can pass various properties along. Make sure to wrap environmental variables in '' so they are interpreted at runtime, rather than hardcoding a secret token into your code!
python -m openapi-transmog spec.json --header X-Api-Token '$token' > api.py
Metadata
Release files for openapi-transmog 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openapi_transmog-0.1.0.tar.gz | 5.5 kB | Without provenance | Details for openapi_transmog-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openapi_transmog-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for openapi_transmog-0.1.0-py3-none-any.whl |
Total release size: 12.6 kB
Release files / openapi_transmog-0.1.0.tar.gz
| Download URL | openapi_transmog-0.1.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a2d75df9709b8a16a500ca04dad9ce1415e56841578bc8b34e31df406d82d4f
|
|
BLAKE2b-256 checksum How to use checksums |
94d4b8c891a0c0a2674bd8670acb88a2c514d71533b24e64f5896caf8970291d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.0 CPython/3.12.7 Darwin/24.3.0
|
Release files / openapi_transmog-0.1.0-py3-none-any.whl
| Download URL | openapi_transmog-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
161c2513ca753b5c826159fd38607861b203019ecf390988df504e6fec85e5af
|
|
BLAKE2b-256 checksum How to use checksums |
a9df390f875c6e43c3c178f70e29b5ca983add4a02061edb2ec19229e9435126
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.0 CPython/3.12.7 Darwin/24.3.0
|
Security for openapi-transmog 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.