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.8.tar.gz (4.8 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.8-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyconfman2-0.0.8.tar.gz
  • Upload date:
  • Size: 4.8 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.8.tar.gz
Algorithm Hash digest
SHA256 2f6ef1cb4947b763a0632e262915db9c3d33c8853c7ea43b024f82161804f3c8
MD5 33bc02d588be9d35408aaca6a9ba57fb
BLAKE2b-256 3f391640f3a5d6ca1bf0d23247f49ff992287a8538c668f3e47a1820603a98ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyconfman2-0.0.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 23af1f5268ac10b2ae88663b3bd362f6ab8956b7d92c32c6fcea1ee10389e94a
MD5 2207a4e1f980a971e8f6e906cc22065f
BLAKE2b-256 a555cda0cb99e02d4cb22acc58e49ea6760d063e289e7c64bd824b3322241f8c

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