ischaojie / schema-admin

Lightweight data model management for Python
MIT License
2 stars 0 forks source link
admin data-model flask json-schema key-value pydantic

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