Skip to main content

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


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.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ddv_settings-0.1.1-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file ddv-settings-0.1.1.tar.gz.

File metadata

  • Download URL: ddv-settings-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.0 Darwin/20.6.0

File hashes

Hashes for ddv-settings-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7c1f3380c68cfa4c61516e6ac2ae807221fc6746e43cb40434a48b8293318e9e
MD5 ef138e3050513f586ab45e7191dc1798
BLAKE2b-256 05289c5325310b26c17227a9660324a326ddc0b6823463a5c7ad61c8c6e33434

See more details on using hashes here.

File details

Details for the file ddv_settings-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ddv_settings-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.0 Darwin/20.6.0

File hashes

Hashes for ddv_settings-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0e8d714ff8f5edb104a06d97730a545a64b859fce50028b370b5ad554a4271b8
MD5 acd0d14f8cc0dc5e5778ba4524bdfc47
BLAKE2b-256 310ad3fbf80fbe9237d8c4747882f4e9d772d0989205db8cb5be0e32486574c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page