Epure supported types
Supported types for type-hinting class attributes¶
For type-hinting class attributes Epure supports:
- most of primitive types of
python
- type:
UUID
- other "epurized" classes and Elist and Eset Generic types
Supported types
from uuid import UUID
from epure import epure, Elist, Eset
@epure()
class SomeEpureCls:
...
@epure()
class AllSupportedTypes:
my_int: int
my_str: str
my_complex: complex
my_float: float
my_bytes: bytes
my_bool: bool
my_UUID: UUID
my_Epure: SomeEpureCls
my_elist: Elist[str]
my_eset: Eset[bytes]
my_object: object
JSON
and object
type
class atribute with type object
will be saved as JSON
to DB
So if you have a object and you dont know which type to use - just choose object
type 🙂