Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 783 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 783 Bytes

ostruct

Package Status Build Status Coverage

OpenStruct for Python.

from ostruct import OpenStruct

car = OpenStruct()
car.make = 'Ford'
car.model = 'Mustang'
car.owner.name = 'John Doe'
car.owner.age = 30

print(car) # {'owner': {'age': 30, 'name': 'John Doe'}, 'make': 'Ford', 'model': 'Mustang'}

Install

$ pip install ostruct

Note: the latest version to support Python 2.7 is ostruct==3.0.1.