Pydantic serialization #1850
adrianschneider94
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
Thanks for sharing, interesting. Any reason (e.g. some esoteric limitation of CQ) for using monkey patching instead of https://docs.pydantic.dev/latest/concepts/types/#handling-third-party-types ? |
Beta Was this translation helpful? Give feedback.
3 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
cadquery-pydantic
https://github.com/sangl-spezialtransformatoren/cadquery-pydantic
A package that holds pydantic schemas for CadQuery classes. With this, you'll be able to use CadQuery objects just like a pydantic model and serialize/deserialize them to json.
This facilitates caching with backends like a database or redis and the usage in APIs via FastAPI etc. Details can be found in the Readme.
Beta Was this translation helpful? Give feedback.
All reactions