This library created for comfortable using config
Project description
Example:
ENG:
import suprconfig.config as config # import module
cfg = config.Config("config.json") # Creating an instance of a class
cfg.add(name = "app-name", value = "suprconfig") # Creating the "app-name" variable with the value "suprconfig" in the config.
cfg.add(name = "version", value = "v1.0") # Creating the "version" variable with the value "v1.0" in the config.
app_name = cfg.get('app-name') # Recording the value of the "app-name" variable from the config. (if no argument is specified, the function will return all variables and config values).
version = cfg.get('version') # Recording the value of the "version" variable from the config. (if no argument is specified, the function will return all variables and config values).
print(f"App Name: {app_name}
Version: {version}") # Information output to the terminal
RUS:
import suprconfig.config as config # Импорт модуля.
cfg = config.Config("config.json") # Создание экземпляра класса.
cfg.add(name = "app-name", value = "suprconfig") # Создание переменной "app-name" со значением "suprconfig" в конфиг.
cfg.add(name = "version", value = "v1.0") # Создание переменной "version" со значением "v1.0" в конфиг.
app_name = cfg.get('app-name') # Запись значение переменной "app-name" из конфига. (если аргумент не указан, функция вернет все переменные и значения конфига).
version = cfg.get('version') # Запись значение переменной "version" из конфига. (если аргумент не указан, функция вернет все переменные и значения конфига).
print(f"App Name: {app_name}
Version: {version}") # Вывод информации в терминал.
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
suprconfig-0.8.tar.gz
(2.3 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 suprconfig-0.8.tar.gz.
File metadata
- Download URL: suprconfig-0.8.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bf29309bb94e90abee0203e8956f1c27409687735c398a4e85a9939a4e49a6c
|
|
| MD5 |
9cf505ad4e89ddd8a2cbd2b6d2ba3da7
|
|
| BLAKE2b-256 |
9b065c1de7c2a289eb2e07386319063001044a98ab72cac82bc5f84831b49671
|
File details
Details for the file suprconfig-0.8-py3-none-any.whl.
File metadata
- Download URL: suprconfig-0.8-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3929812717866d86740bd36c45e9001a31cedc221094ed49e1976fad2e9f240
|
|
| MD5 |
1421ea490e6e7420764e5a8529e618af
|
|
| BLAKE2b-256 |
db68f5ceaf48494c5e7801d2320a30402ea4988e680ab90793a1ced80ec6feda
|