Module for easily reading and exporting settings from files
Project description
DDV Settings
Module for easily reading and exporting settings from files
Example
settings.ini
[a]
b = c
d = e
[f]
g = h
j = k
Code that loads settings from settings.ini
and uses them:
import os
import sys
from ddv.settings import read, export
read("settings.ini")
export(sys.modules[__name__], True, "TEST")
print("Variable TEST_A_B == c")
print(TEST_A_B)
print("Env Var TEST_F_G == h")
print(os.environ.get("TEST_F_G"))
Output:
Variable TEST_A_B == c
c
Env Var TEST_F_G == h
h
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ddv-settings-0.1.0.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for ddv_settings-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7b3a573d14a86133e707267e7c18d4643885574bfbaa414447e587b5b6d28ca |
|
MD5 | 602f1b5b89987a72cd47232e3210db7c |
|
BLAKE2b-256 | 1d1785a65276122ec9af6bc03884600ae493abec897695827b7749692786f643 |