Skip to content
forked from 0kso/Appetizer

A flexible configuration manager for Python

Notifications You must be signed in to change notification settings

sametmax/Appetizer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Appetizer

A flexible configuration manager for Python

Based on a blog post by Sam&Max

Expected behaviour


from appetizer import Configuration, Schema
 
# Free access to the configuration, no constraint:
config1 = Configuration('/path/to/config/file.json')
print config1.url
config1.answer = 42
 
# Access using a Schema:
class MySchema(Schema):
    nom = TextField()
    age = IntegerField()
 
config2 = Configuration('http://data.okso.me/config.iso', schema=MySchema())
config2.name = 'Bob'
# The following commands will fail:
config2.name = 34
config2.nickame = 'Marley'
config2.age = 3.2

About

A flexible configuration manager for Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published