Skip to main content

provide strict type checking for dataclass and pydantic model

Project description

TypedModel

TypedModel aims to provide strict type checking for dataclass and pydantic model.

dataclass is useful, but provides no type checking

pydantic is useful, but sometimes it bugs out

https://github.com/samuelcolvin/pydantic/issues/3189

https://github.com/samuelcolvin/pydantic/issues/3569

Usage

pip install typedmodel
from typedmodel import BaseModel


class Foo(BaseModel):
    a: str
    b: str
    d = 'default'
    e: str = 'default'


foo = Foo(a="a", b="b")

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

typedmodel-0.2.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

typedmodel-0.2.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file typedmodel-0.2.2.tar.gz.

File metadata

  • Download URL: typedmodel-0.2.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for typedmodel-0.2.2.tar.gz
Algorithm Hash digest
SHA256 5c643a190d82133aff65410db5fbc327aef0b68891670ae3e27f7c17248f529c
MD5 3d777eb49ea9dadec52be334b8c23f29
BLAKE2b-256 f0645d0e132060bc594a43d804ef614d6714d0f686f59f344ec823a71af38ea9

See more details on using hashes here.

File details

Details for the file typedmodel-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: typedmodel-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for typedmodel-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 336c49f7d7d5da9c102ebc86acae5d88034e7250b4d77b0b4887bd238e5c5f40
MD5 2b41645eec19150bc4041e360649e59b
BLAKE2b-256 d573a577004acf44219838df26b9f23cd3067a3e9a268a8e190878681e883e5d

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