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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: typedmodel-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ba7f2b2fa661566909d315e29b1dba203efb508d8123fc9fa90718c8605eabc7
MD5 9321a0dd8ef3c426ed97590e3803d477
BLAKE2b-256 ad3f3aab30dace43f3e08cf297e1cc1a5a2c029bf8f8ff9709869f79bbd43519

See more details on using hashes here.

File details

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

File metadata

  • Download URL: typedmodel-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1487f220afcf39a1816e85f1819d4c5cb165af0974781fef7bdae77cca6fb80a
MD5 6d0d233751297d93e72b3ef529ecc999
BLAKE2b-256 f72959a17af9066b1626694161e722cd471bfb7afa00863b159bd9fa4ee1cc51

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