Skip to main content

literal_enums_few_python

No overview available.

def literal_enums_few_python(
schemas: list[dict]
) - > str

Generates a collection of Python Literal types and Enum classes based on provided schema definitions.

Parameters

NameTypeDescription
schemaslist[dict]A list of schema dictionaries containing the names and allowed values for the enums to be generated.

Returns

TypeDescription
strA string containing the generated Python source code for the Literals and Enums.