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=Schema()

Provide a default config

from pyconfman2 import Schema

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

Specify the default config file to load

from pyconfman2 import Schema

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

Specify the config file to load

from pyconfman2 import Schema

config=Schema(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.0.9.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.0.9-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyconfman2-0.0.9.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.0.9.tar.gz
Algorithm Hash digest
SHA256 c700e926604f3119a46c6a1a2ec45ab0e67aa640197f607e6a898a64d396cd1b
MD5 4ae100c36d61b2454fe48aaa1b7a527b
BLAKE2b-256 7c56245b791f84b4624b10656d49ea1e8b98e98fa611c736e936efbedf97c3fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyconfman2-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 3.4 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.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a7a0ddfce73bbd4b8438c2d3963ae7b03901fa97f72cb95fa710c5796b2fe94c
MD5 216944f029c0e21f79d811112a582a1d
BLAKE2b-256 c4bc1e0ac058e512f7c9ea578e246e7906e8ccb4ff30f185036c8a545c6c9fdc

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