Model class with attributes validation
Project description
PY BASE MODEL
Model data validator
Examples
Model with primitive type attributes
from base_model.base_model import BaseModel
class PrimitiveFieldsModel(BaseModel):
id: int
name: str
active: bool
size: float
Model with time type attributes
from datetime import datetime, date, time
from base_model.base_model import BaseModel
class TimeFieldsModel(BaseModel):
birthday: date
register: datetime
alarm: time
Model with list type attributes
from typing import List
from base_model.base_model import BaseModel
class ListFieldsModel(BaseModel):
names: List[str]
ages: List[int]
enables: List[bool]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for base-model-guiosoft-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49953d13de52c3516b73655c2e4359cc95ef1dc9895d6b66c8cb88937baf25f8 |
|
MD5 | ec10744846acf1d54c0feef18552e8d0 |
|
BLAKE2b-256 | 021bb41c53dc7f2409d3a565c88be870b4d3c417c94b8262d152ba00cfae3a67 |
Close
Hashes for base_model_guiosoft-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edccb7ffda7b371df5bd8dbe854fdec49e7b1f637e4d4c0a2f10d3de57b5f6a7 |
|
MD5 | 34293f2e61d91c432956e7d1077c7b1e |
|
BLAKE2b-256 | b692c7912292b7a53e5a012ae0303900de4eb5c037159429aedf2b1231b2fb7f |