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.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

typedmodel-0.1.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for typedmodel-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6ff207806d2eb25c0ba3f3329d830f302202c7d8c43609f36caba97107ee629b
MD5 d0c5e87b7f7118f14199880b4dcac4db
BLAKE2b-256 5a5aca6f2544718c1a69d1ed3643c8639b53796f5b834d92551d44e39547dcc9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for typedmodel-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4692d3e1ac07d8b498cf97a5e90417705b27bc2a1a4c4a9b048e1dfd613fb496
MD5 e02d386f8f32dc3892f98e1933708131
BLAKE2b-256 0d457ed4aaae85c620db872f3d4b62be7572fce55725913e599cfd9d2e1bb327

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