cdd-python
OpenAPI to/fro routes, models, and tests. Convert between docstrings, class
es, methods, argparse, pydantic, and SQLalchemy.
Public SDK works with filenames, source code, and even in memory constructs (e.g., as imported into your REPL).
Features
Type | Parse | Emit | Convert to all other Types |
---|---|---|---|
docstrings (between Google, NumPy, ReST formats; and betwixt type annotations and docstring) | ✅ | ✅ | ✅ |
class es |
✅ | ✅ | ✅ |
functions | ✅ | ✅ | ✅ |
argparse CLI generating functions |
✅ | ✅ | ✅ |
JSON-schema | ✅ | ✅ | ✅ |
SQLalchemy class es |
✅ | ✅ | ✅ |
SQLalchemy Table s |
✅ | ✅ | ✅ |
SQLalchemy hybrid class es |
✅ | ✅ | ✅ |
pydantic class es |
✅ | ✅ | ✅ |
OpenAPI composite
The OpenAPI parser and emitter utilises:
Type | Parse | Emit |
---|---|---|
Bottle route functions | WiP | WiP |
FastAPI route functions | ✅ | ❌ |
JSON-schema (e.g., from SQLalchemy) | ✅ | ✅ |
Navigate to the API Reference to see the API documentation.