Mixin for serializing SQLAlchemy ORM classes into dict or json
Project description
SerialAlchemy might be sticking around
Oh hi. Do you actually use SerialAlchemy? Well, I have some news.
With the release of SQLAlchemy 2.0, it's possible to easily integrate dataclasses with models... which means it's easy to change models to dicts... WHICH MEANS it's possible to serialize a model into JSON without the use of SerialAlchemy.
However...
After recently trying to make some utilities to work with dataclass-based Models, I realized I was basically recreating this library. Since this library still works, what's the point of redoing it?
--
SerialAlchemy adds serialization to SQLAlchemy ORM objects via a mixin class. It is tightly coupled with SQLAlchemy, because it's the best thing ever invented.
About
Here's the elevator pitch: are you defining your models with SQLAlchemy and again with Pydantic? Do you have trouble keeping clear which models are SQLAlchemy models and which models are Pydantic models? Do you have a way to keep your models' models in sync with DB changes?
THAT'S TOO MANY MODELS for my simple brain and my lazy disposition, in any case.
I made SerialAlchemy mainly because I hate repeating myself.
MIT Licensed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file serialalchemy-0.5.6.tar.gz.
File metadata
- Download URL: serialalchemy-0.5.6.tar.gz
- Upload date:
- Size: 31.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d224cf23102d5a7ad6da1d5bfe0dddf0d19097759ddabd53b17271ee0eb456a6
|
|
| MD5 |
546d1aa9929f3cef670f0b8fb7d36daf
|
|
| BLAKE2b-256 |
00cf834c8da450681f68ed2b6a279d444e1564249b8a809c30fc217a73976f74
|
File details
Details for the file serialalchemy-0.5.6-py3-none-any.whl.
File metadata
- Download URL: serialalchemy-0.5.6-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a468392debc4ac612788d6cb75cfb54fa45bc66ae8f76fab9b03a5346b791e42
|
|
| MD5 |
6d59d7c845bc47dcf82a3c25d29c4875
|
|
| BLAKE2b-256 |
33875f0da2d7bd07f88735f33654884b3ac14933f9039709e456f8f57f00c7d2
|