Skip to content

Lightweight data model management for Python

Notifications You must be signed in to change notification settings

ischaojie/schema-admin

Repository files navigation

schema-admin

Warning

Currently, schema-admin is still under experimental.

Lightweight schema data model management for Python ecosystem.

Specifically, schema-admin provides a management interface for easy previewing, editing, and storing schema data models (defined by pydantic or dataclass).

You just need to define a data model:

class FruitEnum(str, Enum):
    pear = "pear"
    banana = "banana"

class User(BaseSchema):
    name: str
    desc: str = "this is description"
    age: int = Field(..., gt=18, lt=100)
    student: bool
    fruit: FruitEnum = FruitEnum.pear
    created_at: datetime = datetime.now()

    class Config:
        icon = "fa-user"

And wow:

There have a demo site, you can find code in here.

demo

LICENSE MIT