Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jakkusakura/typedmodel


https://github.com/jakkusakura/typedmodel

Last synced: about 6 hours ago
JSON representation

Awesome Lists containing this project

README

        

# 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

```shell
pip install typedmodel
```

```python3
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