Skip to main content

Module python

Module python 

Source
Expand description

Python code generation for FastAPI microservices

This module generates FastAPI services, Pydantic v2 models, SQLAlchemy 2.0 async repositories, pytest scaffolding, and requirements.txt from specification data derived from RDF ontologies.

§WvdA / Armstrong compliance

  • All SQLAlchemy queries include execution_options(timeout=30) (deadlock prevention)
  • FastAPI uses lifespan context manager for proper startup/shutdown
  • All error handlers use proper HTTP status codes (no silent failures)

Structs§

Endpoint
An HTTP endpoint specification used when generating pytest scaffolding.
Field
A single field in a Pydantic model or SQLAlchemy table.
PythonGenerator
Python microservice code generator (FastAPI / Pydantic v2 / SQLAlchemy 2.0)