Commits

Kelsey Hightower committed 6e5bd40

Updating README

Comments (0)

Files changed (1)

 Requires PyYAML <http://pyyaml.org/wiki/PyYAML>
 
 Example
------------
+=================
 
 /etc/dummy_config.yaml
 
 
 
 >>> from yamlconfig import YamlConfig
+
 >>> defaults = {'default_skills': 'KickBall'}
+
 >>> config = YamlConfig('/etc/dummy_config.yaml', defaults)
+
 >>> config['main']['name']
 'Napoleon'
+
 >>> type(config['main']['name'])
 <class 'str'>
+
 >>> config['main']['age']
 15
+
 >>> type(config['main']['age'])
 <class 'int'>
+
 >>> config['main']['skills']
 ['Ninja', 'Dancing', 'Nunchucks', 'KickBall']
+
 >>> type(config['main']['skills'])
 <class 'list'>
+
 >>> config['main']['net_worth']
 '$10'
+
 >>> type(config['main']['net_worth'])
 <class 'str'>