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")
check tests for more use cases
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file typedmodel-0.2.8.tar.gz.
File metadata
- Download URL: typedmodel-0.2.8.tar.gz
- Upload date:
- Size: 3.6 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.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26c9270df032ad515176a06c343fcd7f40e76b341c9fed6095b5da76b466eedf
|
|
| MD5 |
7b18b7d4881ffff4d47d832ee8fa68d9
|
|
| BLAKE2b-256 |
c7f0ce930d0fe4e3fa448b10c51c748df2a5284a8a42d4ee0d49d35e6b0be2ee
|
File details
Details for the file typedmodel-0.2.8-py3-none-any.whl.
File metadata
- Download URL: typedmodel-0.2.8-py3-none-any.whl
- Upload date:
- Size: 4.4 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.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9b18f266b93d767a60fa656db1ba556385edb689d7d671495742ea21ce0c2a1
|
|
| MD5 |
a1a77f5761cf4ab67efd4c744cf1f8ab
|
|
| BLAKE2b-256 |
9c3a8bb2bb3c03b20b821931dffae2c6d83e401d2f6cfa486e2afdd6480b60d5
|