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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file env_to_class-1.1.0.tar.gz.
File metadata
- Download URL: env_to_class-1.1.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e273d7546a6befe650ff756b82b8e28ec340fea85ac2a28ad8d60ef758a5b8c
|
|
| MD5 |
883f4d66a320ef54a0712ae83102cf93
|
|
| BLAKE2b-256 |
979cab0ec326d3d13502150bab9c614b24664687cd9ea7df162206c47bd9f56c
|
File details
Details for the file env_to_class-1.1.0-py3-none-any.whl.
File metadata
- Download URL: env_to_class-1.1.0-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a53e7113615fb418520057dd1f0fed54eba1b69f720e2567f6322f05599d7aa4
|
|
| MD5 |
8433fc72cf185b829f4ebd66b137f4b7
|
|
| BLAKE2b-256 |
bbc030f172709236d42e8d8eed2a1ba114fa3914aac7725226c4aea6c2d683dc
|