We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be great to implement generating of Pydantic models. It's like Python3.6, but without __init__ and with Field with alias definition.
__init__
Field
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
The text was updated successfully, but these errors were encountered:
Great idea! We would love this as a Python option. Closing, though, because we do not keep feature requests as open issues.
Sorry, something went wrong.
@dvdsgl
Is there any work or progress on this?
If not, will contributions for this be accepted?
@RazCrimson sure! If you make a PR with supporting test fixture that passes.
No branches or pull requests
It would be great to implement generating of Pydantic models.
It's like Python3.6, but without
__init__
and withField
with alias definition.The text was updated successfully, but these errors were encountered: