Skip to main content

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

Metadata

Release files for config-onion 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for config-onion 0.0.1
File Size Uploaded Provenance Actions
config_onion-0.0.1.tar.gz 3.7 kB Without provenance Details for config_onion-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for config-onion 0.0.1
File Interpreter ABI Platform Actions
config_onion-0.0.1-py3-none-any.whl Python 3 none any Details for config_onion-0.0.1-py3-none-any.whl

Total release size: 7.7 kB

Release files / config_onion-0.0.1.tar.gz

Download URL config_onion-0.0.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
99a59b20a92f5df99a98991195ffd487ee553c56d83f403270ebe0797c00e69f
BLAKE2b-256 checksum
How to use checksums
723ab1ab9c21339b377d0b423be8cca63c8be0c153c7f65b6dc8a08df86a2597
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Release files / config_onion-0.0.1-py3-none-any.whl

Download URL config_onion-0.0.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
409a3d5685bc7eb9a48eb0c2d3fdbd5bec28cd27898ad1abec454eadefa93cfc
BLAKE2b-256 checksum
How to use checksums
9755293abc40e1f7ace57beee2417c7b4c6945dfb77fb93b46afc1ac523d804c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Security for config-onion 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page