Skip to main content

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


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

Uploaded Source

Built Distribution

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

suprconfig-0.9-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file suprconfig-0.9.tar.gz.

File metadata

  • Download URL: suprconfig-0.9.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

Hashes for suprconfig-0.9.tar.gz
Algorithm Hash digest
SHA256 de804b38204e7da25dd025cd7fc1e884331bfd4c825e9cd2b56d12892787f72c
MD5 2de6094d8310edc7e3f13bd573a263d9
BLAKE2b-256 cd55828a2848953141f509f46c8de5fd9543c4f0fcfc205e88a9c603636efddf

See more details on using hashes here.

File details

Details for the file suprconfig-0.9-py3-none-any.whl.

File metadata

  • Download URL: suprconfig-0.9-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

Hashes for suprconfig-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 68c122da55c97d06480d100200d4c4abbde1139b7db51d47516ad43788077e7b
MD5 b1cee2bfb7d4d66ec098878ba2ba6363
BLAKE2b-256 d3b5d1cbc8dbf3679322bc61826bc52a9a36493c50090e093295f2efc0d7460d

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