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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26307f9d6712db798f4cdb01ce962ade44b35c763c029e3b06757ac316c962d1 |
|
MD5 | 6c0d2edf7ddd00544c5af1028cbeec58 |
|
BLAKE2b-256 | f104627bfea4225aa8c2a379ba29590f86a8b76010698ed44c4edcf2716590b5 |
Close
Hashes for base_model_guiosoft-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94d0a104eccea15d80c0e4b452b8c9679e4f69885bc57f9ff8f697edfcf171e2 |
|
MD5 | a955b9dae62c9e74d98bcab6c8d68a01 |
|
BLAKE2b-256 | 156915371b8e4260f262848976f4f11fdcf54e3fe8f141af9ac8c6c6f991ac5e |