Skip to main content

Model class with attributes validation

Project description

PY BASE MODEL

codecov

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

base-model-guiosoft-0.0.3.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

base_model_guiosoft-0.0.3-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file base-model-guiosoft-0.0.3.tar.gz.

File metadata

  • Download URL: base-model-guiosoft-0.0.3.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

File hashes

Hashes for base-model-guiosoft-0.0.3.tar.gz
Algorithm Hash digest
SHA256 49953d13de52c3516b73655c2e4359cc95ef1dc9895d6b66c8cb88937baf25f8
MD5 ec10744846acf1d54c0feef18552e8d0
BLAKE2b-256 021bb41c53dc7f2409d3a565c88be870b4d3c417c94b8262d152ba00cfae3a67

See more details on using hashes here.

File details

Details for the file base_model_guiosoft-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: base_model_guiosoft-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

File hashes

Hashes for base_model_guiosoft-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 edccb7ffda7b371df5bd8dbe854fdec49e7b1f637e4d4c0a2f10d3de57b5f6a7
MD5 34293f2e61d91c432956e7d1077c7b1e
BLAKE2b-256 b692c7912292b7a53e5a012ae0303900de4eb5c037159429aedf2b1231b2fb7f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page