support for basedtyping features with pydantic:
from __future__ import annotations from pydantic import BaseModel class A(BaseModel): a: 1 | 2 A(a=1) # A(a=1) A(a=2) # A(a=2) A(a=3) # ValidationError
Note
the types need to be written as a string, or __future__.annotations
needs to be enabled
pydantic-basedtyping
as a dependencypython -m pydantic_basedtyping install
if you are using pyprojectx, this can be configured:
[tool.pyprojectx] install = ["uv sync", "uv run python -m pydantic_basedtyping install"]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4