Config as Framework
Project description
CAFRAM - Config as Framework
Cafram is a hierarchical configuration framework for Python. It provides classes to map a hierarchical configuration (usually loaded from YAML files) to Python objects. Then it provides a foundation to organize your application code.
Quickstart
On it's simplest form, it can load a simple yaml file and create a NodeObject:
import yaml
from cafram.nodes import ConfAuto
yaml_config = """
config:
namespace: "my_ns"
create_file: True
backups: 3
backup_prefix: null
files:
- name: hello
- name: world
filters:
content:
prepend: "Added at first"
append: "Added at last"
author:
name: MyName
date: True
"""
config = yaml.safe_load(yaml_config)
app = ConfAuto(ident="app", payload=config, autoconf=-1)
print ("List of files: ", app.files.get())
app.dump()
This is quite convenient, but it's quite useless.
Meta
Author: MrJK License: GPLv3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cafram-0.2.0a0.tar.gz.
File metadata
- Download URL: cafram-0.2.0a0.tar.gz
- Upload date:
- Size: 36.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.16 Linux/5.15.109-1-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ffe9cc93e2691a7221b37c8c9e554959ce465ca987e7d49bcbc1df19d658b79
|
|
| MD5 |
5d102c4c3cb535b0ac61466c4afb60c8
|
|
| BLAKE2b-256 |
2b2f6b9fdf7f31092b6d87bff3b9c2f20fee634b83f836bdeb4df917893a7977
|
File details
Details for the file cafram-0.2.0a0-py3-none-any.whl.
File metadata
- Download URL: cafram-0.2.0a0-py3-none-any.whl
- Upload date:
- Size: 42.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.16 Linux/5.15.109-1-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ce805bbbaa6bca535f90bb2e58536458226dc7b19793a9684667039b6ee2dce
|
|
| MD5 |
cee36eac92ee43f6cd690bf183443fb0
|
|
| BLAKE2b-256 |
dd5c720952a782abd7de75a9b5c7db031dfa136e96ac6f2750481f2160c3e973
|