It would be great to implement generating of Pydantic models. It's like Python3.6, but without ``` __init__ ``` and with ```Field``` with alias definition. ```python from typing import Optional from pydantic import BaseModel, Field class Test(BaseModel): test_value: str = Field(..., alias='testValue') another_value: Optional[int] = Field(alias='another_value') data = Test(**{'testValue': 'some data'}) print(data.test_value) # > some data other_data = Test(**{'testValue': 'more data', 'another_value': 123}) print(other_data.test_value) # > more data print(other_data.another_value) # > 123 ```
Activity
[-]Adding Python Pydantic[/-][+]Add support of Python Pydantic[/+]dvdsgl commentedon May 31, 2020
Great idea! We would love this as a Python option. Closing, though, because we do not keep feature requests as open issues.
RazCrimson commentedon Jan 3, 2023
@dvdsgl
Is there any work or progress on this?
If not, will contributions for this be accepted?
dvdsgl commentedon Jan 5, 2023
@RazCrimson sure! If you make a PR with supporting test fixture that passes.
feat(wasm): ADR-0004 Phase 3 -- JSON Schema + Python types (closes #1232