Skip to main content
Help us improve Python packaging – donate today!

Autoload configuration from multiple sources. Autotranslate config into usable object

Project Description

# Flange

Application configuration and object instantiation. This is partially inspired by spring app framework

Resources - Define, Discover, Fetch, Interact, Update

many resources merged
URL handler plugin scheme
object cache

### What it does
- Automatically load the data of various applications/formats using Anyconfig
- Object registry with caching
- Pluggable, automatic object detection/creation from data sources based on jsonschema
- Convenient object access

### What it will do
- encrypt data files, read encrypted files
- Edit data and write back to src files
- Provide prompts for missing elements given a dict and a model/schema

## How it works

- searches for any recongnized config/data files on start
- first pass of loaded sources: look for flange specific config
- performs another load round if needed based on flange config
- repeat load and process steps until all flange config is processed
- final pass of loaded sources: performs a final data merge and normalization
- scans for model instances including model plugins

### Usage

In [1]: import flange

In [3]: flange.sources()
[{'ns': '', 'src': '/Users/a.user/.cmd.yml', 'type': 'yml'},
{'ns': '', 'src': '/Users/a.user/.ansible.cfg', 'type': 'shellvars'},
{'ns': 'docker',
'src': '/Users/a.user/.docker/config.json',
'type': 'json'},
{'ns': 'heroku',
'src': '/Users/a.user/.heroku/config.json',
'type': 'json'},
{'ns': 'm2', 'src': '/Users/a.user/.m2/settings.xml', 'type': 'xml'},
{'ns': 'm2', 'src': '/Users/a.user/.m2/settings.xml.hide', 'type': 'xml'},
{'ns': 'nyttth', 'src': '/Users/a.user/.nyttth/config.yml', 'type': 'yml'},
{'ns': 'nyttth',
'src': '/Users/a.user/.nyttth/config_example.yml',
'type': 'yml'},
{'ns': 'nyttth', 'src': '/Users/a.user/.nyttth/config.yml', 'type': 'yml'},
{'ns': 'nyttth',
'src': '/Users/a.user/.nyttth/config_example.yml',
'type': 'yml'},
{'ns': 'ScreamingFrogSEOSpider',
'src': '/Users/a.user/.ScreamingFrogSEOSpider/spider.config',
'type': 'shellvars'},
{'ns': 'sonic-pi',
'src': '/Users/a.user/.sonic-pi/settings.json',
'type': 'json'},
{'ns': 'env', 'src': 'os', 'type': None}]

Release history Release notifications

History Node


History Node


History Node


This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
flange-0.0.2-py2-none-any.whl (24.7 kB) Copy SHA256 hash SHA256 Wheel py2 Nov 10, 2017
flange-0.0.2.tar.gz (24.2 kB) Copy SHA256 hash SHA256 Source None Nov 10, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page