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
Release files for env-to-class 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| env_to_class-1.1.0.tar.gz | 2.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| env_to_class-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.1 kB
Release files / env_to_class-1.1.0.tar.gz
| Download URL | env_to_class-1.1.0.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e273d7546a6befe650ff756b82b8e28ec340fea85ac2a28ad8d60ef758a5b8c
|
|
BLAKE2b-256 checksum How to use checksums |
979cab0ec326d3d13502150bab9c614b24664687cd9ea7df162206c47bd9f56c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.1 Windows/10
|
Release files / env_to_class-1.1.0-py3-none-any.whl
| Download URL | env_to_class-1.1.0-py3-none-any.whl |
|---|---|
| Size | 2.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a53e7113615fb418520057dd1f0fed54eba1b69f720e2567f6322f05599d7aa4
|
|
BLAKE2b-256 checksum How to use checksums |
bbc030f172709236d42e8d8eed2a1ba114fa3914aac7725226c4aea6c2d683dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.1 Windows/10
|