New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pyconfman2

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyconfman2

A python package for managing YAML configuration

  • 1.0.0
  • PyPI
  • Socket score

Maintainers
1

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.ConfigSchema()
>>> print(config)
{}

Provide a default config

>>> from pyconfman2 import Schema
>>> config=Schema.ConfigSchema({"foo": "bar"})
>>> print(config)
{'foo': 'bar'}

Specify the default config file to load

>>> from pyconfman2 import Schema
>>> config=Schema.ConfigSchema(default_config="default_config.yaml")
>>> print(config)
{'foo': 'bar', 'zoo': {'jar': ['car', 'far']}}

Specify the config file to load

>>> from pyconfman2 import Schema
>>> config=Schema.ConfigSchema(default_config="default_config.yaml", filepath="another_config.yaml")
>>> print(config)
{'foo': 'overwritten_by_another_config', 'zoo': {'jar': ['car', 'far']}}

Schema Loading breakdown

  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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc