Skip to main content

Package for reading configs from yml files

Project description

Yaml config

The package gives object like access for config files in yaml format

Using

yaml_config - root package.

open_config

The function for configuration an object from a file.

The function accepts an unlimited number of arguments. Each argument is a path to the intended configuration file. The function iterates through all paths in the order in which they were passed to the function. The config that was found first will be used. If the arguments run out and the file is not found, an error will be called.

The function returns the configuration as an python dict.

cut_protocol

The function truncates the protocol at the passed url.

The function takes a url in string format as an argument.

The function returns clear domain without protocol.

Developing

Running tests

pytest

Updating

  • Writing new code
  • Updating version in setup.py
  • Running python -m build for build
  • Setup $HOME/.pypirc link.
  • Pushing to pypi via python -m twine upload --repository yaml-config-reader dist/*

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

yaml_config_reader-3.0.1.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

yaml_config_reader-3.0.1-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

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