-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I would like to suggest the addition of support for code generation for Pydantic v2 types in the pkl-python library. In case others think that there's a reason to keep generating classes without Pydantic, I suggest letting the user to choose its target classes generation type (with Pydantic/ without). Pydantic v2 brings features that can enhance the usability and functionality of the pkl-python library.
Why Pydantic is Needed Even when using pkl:
-
Standardized Data Models:
- Pydantic v2 models are widely used in modern Python applications, particularly in APIs and data processing pipelines. By supporting Pydantic v2,
pkl-pythoncan facilitate the integration and interoperability with other systems that rely on these standardized models.
- Pydantic v2 models are widely used in modern Python applications, particularly in APIs and data processing pipelines. By supporting Pydantic v2,
-
Compatibility with Existing Ecosystem (especially with FastAPI):
- Many tools and libraries in the Python ecosystem are updating to support Pydantic v2. FastAPI, a popular web framework, heavily utilizes Pydantic models. Adding support for Pydantic v2 in
pkl-pythonwould streamline the process of usingpkl-pythonwith FastAPI applications, making it easier to generate and manipulate models within the same ecosystem. - For example integration with FastAPI ORMs
- Many tools and libraries in the Python ecosystem are updating to support Pydantic v2. FastAPI, a popular web framework, heavily utilizes Pydantic models. Adding support for Pydantic v2 in
-
Backward Compatibility:
- Supporting Pydantic v2 types does not preclude the continued use of earlier versions or plain Python types. It simply expands the toolkit available to developers using
pkl-python.
- Supporting Pydantic v2 types does not preclude the continued use of earlier versions or plain Python types. It simply expands the toolkit available to developers using
Anyway, thank you for considering this. I look forward to seeing pkl-python evolve with the support for Pydantic v2 types.
Metadata
Metadata
Assignees
Labels
No labels