Skip to main content

A light and global config for research, MVPs and prototype projects.

Project description

Light Config (lco)

Load a config file once and use it as you would use enviroment variables from anywhere in your code.

Somewhere:

import lco

lco.init("some_config.yml")

You can also set the enviroment variable LCO_CONFIG instead.

Somewhere else entirely, 10 layers deep in some object.

import lco

lco["some_value"]
lco["some_group"]["some_value"]

This works across threads and processes.

But why?

This is mostly useful for research code, MVPs or Prototypes, where on doesn't want to pass configuration variables from object to object or across scopes. I wouldn't recommend this for production code as you're essentially using global variables.

What filetypes are supported?

So far, only yaml. Feel free to open a pull request with the filetype of your choice.

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

lco-0.1.0.tar.gz (1.5 kB view hashes)

Uploaded Source

Built Distribution

lco-0.1.0-py3-none-any.whl (1.8 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