NAME
config_onion - layered configuration, because configs are like ogres
VERSION
0.0.1
DESCRIPTION
@@ config.yml
config:
value:
connections:
rabbitmq:
default:
- rabbitmq
- user: guest
password: guest
events:
- amounts:
connection:
$ref: config
$path: /connections/rabbitmq/default
@@ .config.yml
config:
value:
connections:
rabbitmq:
default:
- rabbitmq1
- user: root
password: 123
@@ my.py
from config_onion import read
config = read(['config.yml', '.config.yml'])
print(config_onion) # -> { ... 'connection': ['rabbitmq1', {'user': 'root', 'password: 123'}] ... }
SYNOPSIS
Π‘ΠΊΠ»Π΅ΠΈΠ²Π°Π΅Ρ ΠΊΠΎΠ½ΡΠΈΠ³ΠΈ. Π’Π°ΠΊ ΠΆΠ΅ ΡΠ°Π·ΡΠΌΠ΅Π½ΠΎΠ²ΡΠ²Π°Π΅Ρ ΡΡΡΠ»ΠΊΠΈ Π²ΠΈΠ΄Π°:
$ref: ...
$path: ...
Π’Π°ΠΊΠ°Ρ ΡΠΈΡΡΠ΅ΠΌΠ° ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ Π² swagger-Π΅. Π perl Π΅ΡΡΡ Π°Π½Π°Π»ΠΎΠ³ΠΈΡΠ½ΡΠΉ ΠΌΠΎΠ΄ΡΠ»Ρ Config::Onion
.
FUNCTIONS
read
ARGUMENTS
-
configs
- ΡΠΏΠΈΡΠΎΠΊ ΡΠ°ΠΉΠ»ΠΎΠ²ΡΡ ΠΏΡΡΠ΅ΠΉ ΠΊ ΠΊΠΎΠ½ΡΠΈΠ³Π°ΠΌ. ΠΠ±ΡΠ·Π°ΡΠ΅Π»ΡΠ½ΡΠΉ
RETURNS
Any
INSTALL
$ pip install config_onion
REQUIREMENTS
ΠΠ΅Ρ
LICENSE
Copyright (C) Kosmina O. Yaroslav.
This library is free software; you can redistribute it and/or modify it under the same terms as Python itself.
AUTHOR
Kosmina O. Yaroslav darviarush@mail.ru
LICENSE
MIT License
Copyright (c) 2020 Kosmina O. Yaroslav