Skip to main content

'config loader for json and yml files'

Project description

configmelt

Introduction

The ConfigMeld package simplifies configuration handling by providing a class to manage JSON or YAML configurations. This class allows for easy loading, accessing, and manipulation of configuration attributes.

Installation

To install configmelt, simply use pip:

pip install configmelt

Features:

  • Loading Configurations: Load configurations from JSON or YAML files.
  • Accessing Configurations: Access configuration attributes as object properties.
  • Flexible Representation: Manage configurations in an object-oriented manner.
  • Environmental Integration: Easily convert configurations to environment variables.
  • Schema Generation: Generate JSON schema based on existing configurations.

Usage

  1. Initializing ConfigMeld:
from configmeld import ConfigMeld

# Initialize ConfigMeld with attributes
config = ConfigMeld(foo='bar', nested={'key': 'value'})

# Access configuration attributes
print(config.foo)  # Output: 'bar'
  1. Loading Configurations from Files:
# Load configurations from a JSON/YAML file
path_to_config = 'path/to/config.json'
loaded_config = ConfigMeld.load_config_from_file(path_to_config)

# Access loaded configurations
print(loaded_config.attribute_name)
  1. schema Generation:
# Generate JSON schema based on existing configurations
schema = loaded_config.generate_schema()
print(schema)

Documentation

The Sphinx-generated documentation for configmelt can be found here.

Contribution

Feel free to contribute by submitting issues here.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

configmelt-1.0.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file configmelt-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: configmelt-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for configmelt-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 be71fb39d4d008db28f1e5c92bf025b6b2392892e762496dee754a83dce8c536
MD5 9ea4576c259c105ae9545ee159b85c65
BLAKE2b-256 9a609a50f55cafc8dd8e7cea9a7e56e367fc4cb886e86320cbdd9b103e9d7902

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