Skip to main content

generate_python_model

Function generate_python_model 

Source
pub fn generate_python_model(
    model: &ModelIr,
    ir: &SchemaIr,
    is_async: bool,
    recursive_type_depth: usize,
) -> (String, String)
Expand description

Generate complete Python code for a model.

is_async determines whether delegate methods use async def/await (true) or synchronous def + asyncio.run() wrappers (false). recursive_type_depth controls the depth of generated recursive include TypedDicts.