Generate pydantic model code as a module #543
Unanswered
TheCodingLand
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I was wondering if there is a way to inspect / generate the matching exact pydantic / BaseModel code from an ormar.Model.
The goal would be to generate a python library for use by third party apps, that do not need the ormar models themselves, but might need the code to query an API.
I'm building a platform where a lot of data exchange must be standardized, and I'd like to reuse the same pydantic models, so why not use my ormar models if it's possible ?
Example :
I'd like to generate the following code as as string to output in a python file:
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions