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 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!
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