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.14.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file WrapConfig-0.1.14.tar.gz.

File metadata

  • Download URL: WrapConfig-0.1.14.tar.gz
  • Upload date:
  • Size: 5.4 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.14.tar.gz
Algorithm Hash digest
SHA256 09c0dc1c03ed70000c8a55508ea708cd3ffd6ac784f6b9130d1523b1213a3da0
MD5 78a5f11b2e255ed2adfb3cdbac8274c1
BLAKE2b-256 ec4df5f44f29930fa44e352ad360d7b0f04d632809b7b72329587cf1dd4ca3a3

See more details on using hashes here.

File details

Details for the file WrapConfig-0.1.14-py3-none-any.whl.

File metadata

  • Download URL: WrapConfig-0.1.14-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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 e2e99d5bb220b901b4897b1f7ecda62b9922a068869ba8841a38e9d784f2a650
MD5 1a045ee29d4002bf6e604d7aeca4f227
BLAKE2b-256 e7219218297b7d4e5cb560e28d5a9ec425d617e4d3e7bbe30e8d230d9c1269cd

See more details on using hashes here.

Supported by

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