Skip to main content

Simple and fast object serialization.

Project description

Travis-CI Documentation Status Code Coverage

avocato is a simple and fast ORM/framework-agnostic object serialization library for converting complex objects to and from simple Python datatypes.

Don’t be scared if you’re using an ORM/framework. It can easily be adapted to be used with any ORM/framework of your liking. Currently it supports Django ORM and peewee.

This library is heavily influenced by serpy.


$ pip install avocato


Find documentation at


import avocato

class Bar(object):
    patrick = 'star'

class Foo(object):
    over = 9000
    spongebob = 'squarepants'
    bar = Bar()

class BarSerializer(avocato.Serializer):
    patrick = avocato.StrField()

class FooSerializer(avocato.Serializer):
    over = avocato.IntField()
    spongebob = avocato.StrField()
    bar = BarSerializer()

foo = Foo()
# {'over': 9000, 'spongebob': 'squarepants', 'bar': {'patrick': 'star'}}

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 avocato, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size avocato-0.1.0-py3-none-any.whl (9.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size avocato-0.1.0.tar.gz (8.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page