Question: Use more than one alias
See original GitHub issueQuestion
For bugs/questions:
- OS: MAC
- Python version 3.6
- Pydantic version 0.14
Is it possible to use more than 1 alias? I have data that can sometime have an attribute like_this
and sometimes likeThis
and I want to reuse the model
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:20 (10 by maintainers)
Top Results From Across the Web
Question: Use more than one alias · Issue #324 · pydantic ...
OS: MAC; Python version 3.6; Pydantic version 0.14. Is it possible to use more than 1 alias? I have data that can sometime...
Read more >Using multiple alias in a single command - Unix Stack Exchange
I'm facing problem in using multiple alias in a single line on Mac bash Terminal . I have setup below alias in my...
Read more >how can add more than one alias for every mailbox
You can have only one alias ( mailNickname) per mailbox. You can have multple proxy SMTP addresses ( the EmailAddresses switch in set-mailbox) ......
Read more >Can we add multiple aliases on one column? - Stack Overflow
No, you cannot add multiple aliases to a single column in your query. Query syntax of SQL allows for zero or one alias;...
Read more >Use Question Aliases - Alchemer Help
Question Aliases, available on the Logic tab of each of your questions, allow you create a shortname for questions in your survey.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://pydantic-docs.helpmanual.io/blog/pydantic-v2/#more-powerful-aliases
It will be possible in V2. It’s already implemented in pydantic-core.
Ran across this for use-case of renaming an API field – had to support both old field name and new field name going to same place in order to maintain API stability.
For the web archives, a slight twist on @jmkd3v’s solution for when you have many fields on your model and don’t want to type everything out: