Skip to main content

Wraper to manage configurations

Project description

WrapConfig

A Python package for managing and persisting configurations with flexibility and ease.

PyPI Version Coverage Status License GitHub Stars

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


Download files

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

Source Distribution

WrapConfig-0.1.13.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

WrapConfig-0.1.13-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

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

Hashes for WrapConfig-0.1.13.tar.gz
Algorithm Hash digest
SHA256 b519d222b8975302946099b46e93a28a0d0e1ab886fc4fed0226ae3169001eac
MD5 539ab822b6009464e46bcb1d8d0d8ba3
BLAKE2b-256 572db05d8a101462c6260afde4370fbdb9c32703a58c512a8a1429a735142cef

See more details on using hashes here.

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

Hashes for WrapConfig-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 9d8edb15ac7f46d78e9d985c2a3f6ed5154b91150e3857b975f878626e9c90ee
MD5 8ad59cf40d89395bd7ed613e666f5c63
BLAKE2b-256 d17d7cb8f9d06cb366d2369d2e87bb50e620b708d7473690b5159f8735f2679e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page