type_bridge.generator.render.attributes¶
attributes
¶
Render attribute class definitions from parsed schema.
AttributeContext
dataclass
¶
AttributeContext(class_name, base_class, docstring, flags_args, regex=None, allowed_values=None, range_min=None, range_max=None, default=None, transform=None, independent=False)
Context for rendering a single attribute class.
render_attributes
¶
Render the complete attributes module source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema
|
ParsedSchema
|
Parsed schema containing attribute definitions |
required |
class_names
|
dict[str, str]
|
Mapping from TypeDB names to Python class names |
required |
Returns:
| Type | Description |
|---|---|
str
|
Complete Python source code for attributes.py |