Skip to content
Snippets Groups Projects
Commit 4945f4e8 authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

update README.md fix issue #1

parent 2f5bcc26
No related branches found
No related tags found
No related merge requests found
......@@ -4,4 +4,27 @@ Pyhton Konfigurationsklasse für YAML Dateien.
## Einbindung in andere Projekte
Dieses Projekt ist selbst als python package Strukturiert und kann daher einfach
als git submodule direkt in andere Projekte eingebunden werden.
\ No newline at end of file
als git submodule direkt in andere Projekte eingebunden werden.
```bash
git submodule add git@git.imp.fu-berlin.de:coding-at-fu/yaml_config.git dict_filter
```
## Verwendung
Wurde das Projekt wie oben stehend eingebunden kann das Modul wie folgt verwendet werden:
```python
from yaml_config import yaml_config
config = yaml_config.YamlConfig(path = '/path/to/conf/file.yml')
def do_whatever():
config = yaml_config.YamlConfig.getInstance()
print (config.toDict().get('config_key'))
# wird foo ausgeben wenn config_key den Wert foo hat.
def reconfigure():
config = yaml_config.YamlConfig.getInstance()
config.reload()
# Die Konfiguration wurde neu eingelesen.
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment