Skip to main content

A python package for managing YAML configuration

Project description

pyconfman2

pyconfman2 is designed to handle schema configurations by loading properties from a dictionary or a YAML configuration file. It provides methods for adding, getting, and removing properties from the schema.

Installation

python -m pip install pyconfman2

Usage

Basic

In it's most basic form, a Schema can be created which will load a local "config.yaml" or "config.yml" file present.

from pyconfman2 import Schema

config=ConfigSchema()

Provide a default config

from pyconfman2 import Schema

config=ConfigSchema({"foo": "bar"})

Specify the default config file to load

from pyconfman2 import Schema

config=ConfigSchema(default_config="default_config.yaml")

Specify the config file to load

from pyconfman2 import Schema

config=ConfigSchema(filepath="another_config.yaml")

Schema Loading breakdown

init

  1. Load the hard-coded defaults
  2. Load (and override) using the "default config" file if present
  3. Load (and override) using the config file if present

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

pyconfman2-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

pyconfman2-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file pyconfman2-0.1.0.tar.gz.

File metadata

  • Download URL: pyconfman2-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pyconfman2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 15b5cfcfee14d48b83efc31917696684444b7af2c2d0888bfc58e2dd3688e771
MD5 f9e45c026a617fbec88cb554172cda8b
BLAKE2b-256 5428d21b5ff09b6b92d814a76f0e2dc382b582895d87d74612e61b10fd619089

See more details on using hashes here.

File details

Details for the file pyconfman2-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyconfman2-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pyconfman2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5c970169ac5f01c5b3933f7ec63d59c7154baab33d9f9ab980b624f738463f0
MD5 c2f06bb3da8a5fbf185632f0c1329ceb
BLAKE2b-256 f3e5b50c206e82b6e9cb9caceee3b73479f0f6af073fa742793bc1ee6b5056b0

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