Wraper to manage configurations
Project description
WrapConfig
A Python package for managing and persisting configurations with flexibility and ease.
Table of Contents
Features
- Flexible Configuration: Easily manage configurations with support for nested keys and subkeys.
- Persistence: Persist configurations to various data sources, including in-memory, JSON, and YAML files.
- Extensible: Easily extend the package with custom data source support.
Installation
You can install the package via pip:
pip install WrapConfig
Usage
from wrapconfig import JSONWrapConfig
# Create a JSONWrapConfig instance
config = JSONWrapConfig('config.json')
# Set a configuration value
config.set('section', 'key', value = 'value')
# the value key is not necessary,
config.set('section', 'key', 'value') # results in the same, but is less readable
config.set('section') # will fail, since there is only a key no value
# Get a configuration value
value = config.get('section', 'key')
# Persist changes
config.save()
Configuration
You can configure the package in various ways, including:
- Setting default save behavior.
- Choosing different data sources such as JSON and YAML.
Examples
For more usage examples, please refer to the examples directory. (TODO)
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 WrapConfig-0.1.13.tar.gz.
File metadata
- Download URL: WrapConfig-0.1.13.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b519d222b8975302946099b46e93a28a0d0e1ab886fc4fed0226ae3169001eac
|
|
| MD5 |
539ab822b6009464e46bcb1d8d0d8ba3
|
|
| BLAKE2b-256 |
572db05d8a101462c6260afde4370fbdb9c32703a58c512a8a1429a735142cef
|
File details
Details for the file WrapConfig-0.1.13-py3-none-any.whl.
File metadata
- Download URL: WrapConfig-0.1.13-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d8edb15ac7f46d78e9d985c2a3f6ed5154b91150e3857b975f878626e9c90ee
|
|
| MD5 |
8ad59cf40d89395bd7ed613e666f5c63
|
|
| BLAKE2b-256 |
d17d7cb8f9d06cb366d2369d2e87bb50e620b708d7473690b5159f8735f2679e
|