I just released a new small project of mine called Alchemize. Lately, I've been writing a lot of clients and services in Python and I've noticed that there tends to be quite a bit of code duplication between the data models that interact with the DB's and APIs. It seems like you have one for your ORM and one for your API input/output. It really becomes a pain to maintain. This is what spawned the idea of Alchemize.
There are plenty of de/serialization libraries out there. Unfortunately, nearly all of them that I've seen are centered around you creating a separate model for it; the exact thing I'm trying to avoid. What I wanted was something I could use to augment my existing ORM models. Enter Alchemize!
Alchemize allows for complete two-way serialization and deserialization of JSON data via an explicit mapping. This mapping allows for you to even create nested structures for easier data handling.
I know this is kind of a niche project, but perhaps other people who need to do similar things might find it useful.
pip install alchemize
- GitHub: jmvrbanac/alchemize
- PyPI: alchemize
- Travis CI: