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

Uploaded Source

Built Distribution

typedmodel-0.2.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: typedmodel-0.2.0.tar.gz
  • Upload date:
  • Size: 3.1 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.0.tar.gz
Algorithm Hash digest
SHA256 fa2803456363149861a28a66712a32b81894d84c0c9f29652ec9c1e30a260cb3
MD5 91d2a8e295f2d339686fbe8b18d02429
BLAKE2b-256 6d93e8b49663441bdda0e076fee7f483db826d431abdf0392395db67db64fd37

See more details on using hashes here.

File details

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

File metadata

  • Download URL: typedmodel-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb8e1883a58dd21b7a3fbb5d997ba5d1bc9f0f68bc2ab4900665ac58c7b2a7a4
MD5 8cc4801abd0ac9d8000c4426ed79ae4f
BLAKE2b-256 113494fef8173029074d85519d298aad4c319f79d623ccf74859edd181beabb0

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