Skip to main content

Create data objects that can be easily converted to and from dicts suitable for use as JSON

Project description

Dodge is a Python library that allows easy creation of data objects. These data objects can then be converted from and to dictionaries, allowing easy JSON serialisation.


import dodge

Instrument = dodge.data_class("Instrument", [

saxophone = Instrument("saxophone", "brass")

serialised_saxophone = dodge.obj_to_dict(saxophone)
unserialised_saxophone = dodge.dict_to_obj(serialised_saxophone)

print unserialised_saxophone.material # Prints "brass"


2-Clause BSD

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 dodge, version 0.1.9
Filename, size File type Python version Upload date Hashes
Filename, size dodge-0.1.9.tar.gz (3.9 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