FireO
FireO copied to clipboard
Allow models to be specified more pythonically - with type hints, perhaps use pydantic for type checking
Currently it doesn't seem possible/useful to assign type hints to fields, for example
class User(mdl.Model):
name: str = mdl.TextField()
Ideally, using a validation library such as pydantic
class User(mdl.Model):
name: str
Reasons for the suggestion:
- more pythonic (concise, using built-in type hints)
- potentially support more types out of the box
- allow pydantic models instead of NestedModel -> cannot accidentally .save() !
- robust validation provided by third party validation library