www.immobilienscout24.de
Berlin | Juli 2014 | Schlomo Schapiro
Systems Architect / Open Source Evangelist
http://creativec...
/etc/foobar.conf
log:
level: INFO
file: /var/log/foobar.log
users:
admin:
password: changeme
full_name: Admin User
/etc/foobar.d/
log:
level: INFO
file: /var/log/foobar.log
users:
admin:
password: changeme
full_name: Admin User
00_defaul...
https://github.com/ImmobilienScout24/yamlreader
YAML
YAML
YAML
YAML
YAML
MERGE
from yaml import safe_load
config = safe_load(open(“/etc/foobar.conf”))
initialize_logging(config[“log”][“file”])
https://...
from yamlreader import yaml_load
yaml_load(“/etc/foobar.conf”)
yaml_load(“/etc/foobar.d/”)
yaml_load(“/etc/foobar.d/*.yml”...
Upcoming SlideShare
Loading in …5
×

EuroPython 2014 YAML Reader Lightning Talk

680 views

Published on

Python library (https://github.com/ImmobilienScout24/yamlreader) that wraps the yaml.safe_load function to support reading multiple YAML files as one.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
680
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

EuroPython 2014 YAML Reader Lightning Talk

  1. 1. www.immobilienscout24.de Berlin | Juli 2014 | Schlomo Schapiro Systems Architect / Open Source Evangelist http://creativecommons.org/licenses/by-nd/4.0 YAML Reader Modularized Configuration Made Easy @schlomoschapiro
  2. 2. /etc/foobar.conf log: level: INFO file: /var/log/foobar.log users: admin: password: changeme full_name: Admin User
  3. 3. /etc/foobar.d/ log: level: INFO file: /var/log/foobar.log users: admin: password: changeme full_name: Admin User 00_default.yaml foobar.rpm is24-foobar.yaml log: file: /is24/logs/foobar.log users: admin: password: is24!123 view: password: view is24-foobar.rpm
  4. 4. https://github.com/ImmobilienScout24/yamlreader YAML YAML YAML YAML YAML MERGE
  5. 5. from yaml import safe_load config = safe_load(open(“/etc/foobar.conf”)) initialize_logging(config[“log”][“file”]) https://github.com/ImmobilienScout24/yamlreader from yamlreader import yaml_load config = yaml_load(“/etc/foobar.d/”) initialize_logging(config[“log”][“file”])
  6. 6. from yamlreader import yaml_load yaml_load(“/etc/foobar.conf”) yaml_load(“/etc/foobar.d/”) yaml_load(“/etc/foobar.d/*.yml”) yaml_load([“file1.conf”,”file2.conf”]) https://github.com/ImmobilienScout24/yamlreader http://www.yadt-project.org https://github.com/ImmobilienScout24

×