pydantic-duality icon indicating copy to clipboard operation
pydantic-duality copied to clipboard

Automatically and lazily generate three versions of your pydantic models: one with Extra.forbid, one with Extra.ignore, and one with all fields optional

Results 8 pydantic-duality issues
Sort by recently updated
recently updated
newest added

**Describe the bug** We're parsing objects using `MyModel.__response__`, then pass the objects as if they were instances of `MyModel`. This fails because `isinstance(obj, MyModel)` return `False`. **To Reproduce** Steps to...

I have some pydantic models that define custom `__init__()` with a call to `super()`. When migrating to DualBaseModel as my base model, defining such models started to raise `TypeError`. Here's...

`python-duality` recursively resolves annotations like `A | B`, `list[A]`, `tuple[A]`, etc, but fails to resolve any of the types from `typing` such as `Union`, `List`, `NamedTuple`, etc. Here's an example...

Currently, all docs live on the same page which can get quite uncomfortable to use and limits us in terms of documentation's structure. Splitting it into multiple pages and adding...

documentation
good first issue

Any attempt to import `DualBaseModel` into application code results in: ``` testpd.py", line 3, in from pydantic_duality import DualBaseModel File "site-packages/pydantic_duality/__init__.py", line 22, in from pydantic.main import ModelMetaclass ImportError: cannot...