Skip to main content

Simple object serialization for SQLAlchemy

Project description

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.


SerialAlchemy aims to be the one serialization library that I use for web projects. If other people like it, that’s cool too. Released under the MIT License, so fork away!

Why create SerialAlchemy?

The serialization problem for web apps has been solved many times over. I had been using marshmallow for several projects. It’s a great library, and has its own justification for existence.

While I liked working with marshmallow just fine, it is designed to be very broad and fit a lot of different situations. I mostly create small web applications, so my situation rarely changes.

If there is one reason for creating SerialAlchemy, it is the fact that I didn’t like the idea of defining my models, then having to define marshmallow schemas. It felt like redundancy to me. Keeping the marshmallow schema in sync with model changes was also a pain, but feeling like I was repeating myself was the bigger reason.

And yes, “alAl” in SerialAlchemy bothers me, but SeriAlchemy sounds too much like Siri-Alchemy, and I fear Apple’s legal team.

Why not use SerialAlchemy?

I thought I’d take a different approach to selling this. Truth is, I made this library for me, and don’t really care if anyone else uses it.

  • SQLAlchemy is required. This library simply won’t work without it.
  • While SerialAlchemy is not beholden to any particular web framework, it doesn’t make a lot of sense outside the web application area. SQLAlchemy has a built-in way to serialize expressions, and the result sets can be pickled.
  • There is no data validation. SQLAlchemy has simple validation built-in, and I feel like something more extensive is outside the scope of this project.
  • SerialAlchemy is Python 3 only. Get used to it ;)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for SerialAlchemy, version 0.3.4.post1
Filename, size File type Python version Upload date Hashes
Filename, size SerialAlchemy-0.3.4.post1-py3-none-any.whl (7.7 kB) File type Wheel Python version 3.7 Upload date Hashes View
Filename, size SerialAlchemy-0.3.4.post1.tar.gz (6.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page