Skip to content

mwilliamson/dodge.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dodge

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.

Example

import dodge

Instrument = dodge.data_class("Instrument", [
    "name",
    "material",
])


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"

License

2-Clause BSD

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published