Skip to content

ajkdrag/Super-Config

Repository files navigation

GitHub-Pages deployment status PyPI - Version

Super-Config

Config parsing on steroids.

Super-Config is available on PyPI and can be installed with pip.

$ pip install Super-Config

After installing Super-Config you can use it like any other Python module.

Here is a simple example:

import superconfig as sc
from superconfig.superconf import SuperConfig


def main():
    SuperConfig.setup(
        path_default="configs/default.ini", path_custom="configs/dev.yaml"
    )

    print(SuperConfig.get("LOCAL_PATHS.path"))
    print(SuperConfig.get("CLOUD_PATHS.path"))
    print(SuperConfig.get("ENVIRONMENT_NAME"))
    val = SuperConfig.get("ENVIRONMENT_ID", dtype=sc.INT)
    print(val, type(val))

The API Reference provides API-level documentation

Refer the examples folder in this repository