Skip to main content

Supported Field Types

Auto-generated from SchemaMapper - Do not edit manually.

Framework M supports these Python types for DocType fields.


Basic Types

Python TypeSQLAlchemy TypeDescription
strStringText field
intIntegerInteger number
floatFloatFloating point number
boolBooleanTrue/False
DecimalNumericPrecise decimal (money)

Date/Time Types

Python TypeSQLAlchemy TypeDescription
dateDateDate only
datetimeDateTime(timezone=True)Date and time (UTC)
timeTimeTime only

Optional Types

Python TypeDescription
`strNone`
`intNone`

Collection Types

Python TypeDescription
list[str]List of strings (JSON)
list[ChildDoc]Child table
dict[str, Any]JSON object

Special Types

Python TypeSQLAlchemy TypeDescription
UUIDUUIDUnique identifier
bytesLargeBinaryBinary data

Field Options (Pydantic)

from pydantic import Field

# Required field
name: str = Field(description="Name")

# Optional with default
status: str = Field(default="Draft", description="Status")

# Nullable optional
email: str | None = Field(default=None, description="Email")

# With constraints
quantity: int = Field(ge=0, le=1000, description="Quantity")
code: str = Field(min_length=3, max_length=20)