Enviroment variables to class object with checking for the presence of parameters
Project description
Description
Simple use env settings with class type
install
pip install env-to-class
import
from env_to_class import Settings
Description
The library allows you to encrypt your settings stored in json format.
It is possible to convert from a simple storage option to an encrypted one.
To work with the encrypted version of the settings, you need to pass the startup parameter - the password with which the encryption took place.
Try it, the library is very simple.
Usage
Import lib
required_settings = 'Database.name, Database.user, Database.pwd, Database.host, Clickhouse.host, Clickhouse.user, Clickhouse.pwd'
settings = Settings(required_settings)
nameDB = settings.Database.name
userDB = settings.Database.user
pwdDb = settings.Database.pwd
hostDB = settings.Database.host
clickhouseHost = settings.Clickhouse.host
clickhousePwd = settings.Clickhouse.pwd
clickhouseUser = settings.Clickhouse.user
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
env_to_class-1.1.0.tar.gz
(2.0 kB
view hashes)
Built Distribution
Close
Hashes for env_to_class-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a53e7113615fb418520057dd1f0fed54eba1b69f720e2567f6322f05599d7aa4 |
|
MD5 | 8433fc72cf185b829f4ebd66b137f4b7 |
|
BLAKE2b-256 | bbc030f172709236d42e8d8eed2a1ba114fa3914aac7725226c4aea6c2d683dc |