Saravanan666/pypi-org huggingface dataset:
Package: configmount
The configmount projectConfig is a tool to mount configuration files into your filesystem, so that you can navigate through the configuration hierarchy and access its values like files.ExampleCreate a configuration directory for testing viamkdir ~/etcand place the following yaml file into it:~/etc/config.ymlgroup:key:valueanother group:key:valueNow create a mount directory/mnt/etcand mount the configuration directory into it.mkdir /mnt/etc
configmount mount --root ~/etc /mnt/etcYou should be able to navigate into the/mnt/etcdirectory and
see the filekeyand the directoryanother group. Now you can change the configuration value ofkeylike:cd /mnt/etc/config.yml
echo new value >keyThe changes are written back into the file as soon as you unmount the directory~/etcfrom the mountpoint/mnt/etcvia:fusermount -u /mnt/etcFinallycat ~/etc/config.ymlshould give you the modified file.
Package: config-ninja
Config Ninja 🥷Similar toconfd, manage your system configuration files by populatingJinja2templates with data from a remote provider.Installationconfig-ninjais installed using the official installer or withpip/pipx. If your system supportssystemd, you can then enableconfig-ninjaas asystemdservice.Official InstallerThe recommended way to installconfig-ninjais with the official installer:curl-sSLhttps://bryant-finney.github.io/config-ninja/install.py|python3-To view available installation options, run the installer with the--helpflag:curl-sSLhttps://bryant-finney.github.io/config-ninja/install.py|python3---helpusage: install [-h] [--version VERSION] [--pre] [--uninstall] [--force] [--path PATH] [--backends BACKENDS]

Installs the latest (or given) version of config-ninja

options:
  -h, --help           show this help message and exit
  --version VERSION    install named version
  --pre                allow pre-release versions to be installed
  --uninstall          uninstall config-ninja
  --force              respond 'yes' to confirmation prompts; overwrite existing installations
  --path PATH          install config-ninja to this directory
  --backends BACKENDS  comma-separated list of package extras to install, or 'none' to install no backendsWithpip/pipxAlternatively, usepip/pipxto installall available backends(or choose a specific one):pipinstall'config-ninja[all]'Enable thesystemdServiceAfter installingconfig-ninja, enable it as asystemdservice for the current user:# omit '--user' to install the agent at the system levelconfig-ninjaselfinstall--userHow It WorksTo demonstrate how the mechanics work locally:create a settings file forconfig-ninja:cat<<EOF >config-ninja-settings.yamlCONFIG_NINJA_OBJECTS:example-0:dest:format: jsonpath: ./.local/settings.jsonsource:backend: localformat: tomlinit:kwargs:path: ./.local/config.tomlEOFstartconfig-ninjainmonitormode:config-ninjamonitorin a separate shell, create theconfig.toml:cat<<EOF >./.local/config.toml[example-0]a = "first value"b = "second valueEOFinspect the generatedsettings.json:cat./.local/settings.json{"example-0":{"a":"first value","b":"second value"}}Make changes to the data inconfig.toml, andconfig-ninjawill updatesettings.jsonaccordingly:cat<<EOF >>./.local/config.toml[example-1]c = "third value"d = "fourth valueEOFcat./.local/settings.json{"example-0":{"a":"first value","b":"second value"},"example-1":{"1":"third value","2":"fourth value"}}Chances are, you'll want to update theconfig-ninja-settings.yamlfile to use a remote backend (instead oflocal). Seeconfig_ninja.contribfor a list of supported config providers.Configuration ArchitectureTheconfig-ninjaagent monitors the backend source for changes. When the source data is changed, the agent updates the local configuration file with the new data:sequenceDiagram
    loop polling
       config-ninja->>backend: query for changes
    end

    backend->>+config-ninja: [backend changed] fetch config
    config-ninja->>-filesystem: write updated configuration file
Package: configobj
ConfigObjis a simple but powerful config file reader and writer: anini
file round tripper. Its main feature is that it is very easy to use, with a
straightforward programmer’s interface and a simple syntax for config files.List of FeaturesNested sections (subsections), to any levelList valuesMultiple line valuesFull Unicode supportString interpolation (substitution)Integrated with a powerful validation systemincluding automatic type checking/conversionand allowing default valuesrepeated sectionsAll comments in the file are preservedThe order of keys/sections is preservedPowerfulunreprmode for storing/retrieving Python data-typesChangelogRelease 5.0.8fixing/test for a regression introduced in 5.0.7 that preventedimport validatefrom workingRelease 5.0.7update testing to validate against python version 2.7 and 3.5-3.11update broken links / non-existent services and referencesOlder ReleasesRelease 5.0.6 improves error messages in certain edge casesRelease 5.0.5 corrects a unicode-bug that still existed in writing filesRelease 5.0.4 corrects a unicode-bug that still existed in reading files after
fixing lists of string in 5.0.3Release 5.0.3 corrects errors related to the incorrectly handling unicode
encoding and writing out filesRelease 5.0.2 adds a specific error message when trying to install on
Python versions older than 2.5Release 5.0.1 fixes a regression with unicode conversion not happening
in certain cases PY2Release 5.0.0 updates the supported Python versions to 2.6, 2.7, 3.2, 3.3
and is otherwise unchangedRelease 4.7.2 fixes several bugs in 4.7.1Release 4.7.1 fixes a bug with the deprecated options keyword in 4.7.0.Release 4.7.0 improves performance adds features for validation and
fixes some bugs.
Package: configobj-dev
ConfigObjis a simple but powerful config file reader and writer: anini
file round tripper. Its main feature is that it is very easy to use, with a
straightforward programmer’s interface and a simple syntax for config files.List of FeaturesNested sections (subsections), to any levelList valuesMultiple line valuesFull Unicode supportString interpolation (substitution)Integrated with a powerful validation systemincluding automatic type checking/conversionand allowing default valuesrepeated sectionsAll comments in the file are preservedThe order of keys/sections is preservedPowerfulunreprmode for storing/retrieving Python data-typesChangelogUnreleasedDrop support for EOL Python 2.6 and 3.3Add support for Python 3.7Release 5.1.0Unified modules into the ‘configobj’ package (#72, #31, #32)Addedvalidatev1.1.0 shim to allow a gradual migration,
rewrite your imports asfrom configobj.validate import …to get rid of itAlternative line comment markers for more INI compatibility (#79)More detailed multi-error reports (#73)Added ‘decoupled’ mode to merge() (#115)fix:mixed_listaccepts type name variants (#110)fix: Don’t quote git-style section titles (#74)docs: Explicit mention offorce_listand its pitfalls (#112)Older ReleasesRelease 5.0.6 improves error messages in certain edge casesRelease 5.0.5 corrects a unicode-bug that still existed in writing filesRelease 5.0.4 corrects a unicode-bug that still existed in reading files after
fixing lists of string in 5.0.3Release 5.0.3 corrects errors related to the incorrectly handling unicode
encoding and writing out filesRelease 5.0.2 adds a specific error message when trying to install on
Python versions older than 2.5Release 5.0.1 fixes a regression with unicode conversion not happening
in certain cases PY2Release 5.0.0 updates the supported Python versions to 2.6, 2.7, 3.2, 3.3
and is otherwise unchangedRelease 4.7.2 fixes several bugs in 4.7.1Release 4.7.1 fixes a bug with the deprecated options keyword in 4.7.0.Release 4.7.0 improves performance adds features for validation and
fixes some bugs.
Package: configonaut
ConfigonautConfigonaut is a Python library for handling JSON configuration files. It provides an intuitive and simple way to access, modify, and save configurations stored in JSON format.InstallationInstall Configonaut with pip:pipinstallconfigonautUsagefromconfigonautimportConfigonaut# Create a new configurationconfig=Configonaut('config.json')# Access configurationdb_config=config['database']# Modify configurationdb_config['host']='localhost'db_config['port']=5432# Save configurationdb_config.save()FeaturesSimple and intuitive access to configuration items.Automatic saving of modifications.Ability to navigate through the configuration hierarchy.LicenseConfigonaut is licensed under the MIT License. SeeLICENSEfor more details.
Package: config-onion
NAMEconfig_onion -  layered configuration, because configs are like ogresVERSION0.0.1DESCRIPTION@@config.ymlconfig:value:connections:rabbitmq:default:-rabbitmq-user:guestpassword:guestevents:-amounts:connection:$ref:config$path:/connections/rabbitmq/default@@.config.ymlconfig:value:connections:rabbitmq:default:-rabbitmq1-user:rootpassword:123@@my.pyfromconfig_onionimportreadconfig=read(['config.yml','.config.yml'])print(config_onion)# -> { ... 'connection': ['rabbitmq1', {'user': 'root', 'password: 123'}] ... }SYNOPSISСклеивает конфиги. Так же разыменовывает ссылки вида:$ref: ...
$path: ...Такая система используется в swagger-е. В perl есть аналогичный модульConfig::Onion.FUNCTIONSreadARGUMENTSconfigs- список файловых путей к конфигам. ОбязательныйRETURNSAnyINSTALL$pipinstallconfig_onionREQUIREMENTSНетLICENSECopyright (C) Kosmina O. Yaroslav.This library is free software; you can redistribute it and/or modify
it under the same terms as Python itself.AUTHORKosmina O. Yaroslavdarviarush@mail.ruLICENSEMIT LicenseCopyright (c) 2020 Kosmina O. Yaroslav
Package: configparse
configparseSummaryconfigparse is a drop-in-place replacement for python'sargparsemodule
which reads configuration files in addition to command line arguments.FeaturesIf the configuration directory exists, all of files in<config_directory>/<prog>/are read.
All files matching~/.<prog>*are read.Files are treated according to their extension:config.jsonwill be parsed as JSON,myconf.ymlwill be parsed as YAML.If a file does not have an extension, it will be parsed according to the default
file format. This is preset to JSON, but can be changed by applications.Configuration DirectoryOn Windows, the configuration directory looked up in%AppData%.
On any other OS, it is looked up from$XDG_CONFIG_HOME.
If the variable is not present (on any OS), files are read from~/.config.Supported FormatsThe following file formats are currently supported:JSON (.json)YAML (.yml)INI  (.ini)TOML (.toml)Feel free to submit a pull request adding more formats.
See CONTRIBUTING.md for an overview,
if you already have a parser it should be very simple.Using configparseAs a libraryIf you are an application developer who wants to use the library,
there is one entry point: theConfigParserclass,
which is also aliased toParserfor convenience.
You can treat aConfigParserinstance exactly as you would anArgumentParserinstance (as long as you passprogto the constructor).Note that this means thatparse_argswill parsesys.argvin addition to parsing configuration files. If you don't want this behavior,
pass an empty list toparse_argslike this:args = parser.parse_args([]).If you want to change the default file format (e.g. for files named~/.myprogwithout an extension), useparser.set_default_ext(ext), where 'ext' is the
file extension for your format.Differences fromargparseThe only API differences are as follows:the name of the parser isConfigParser, notArgumentParsertheprogkeyword is required for initializingConfigParser(so that it knows where to look for configuration files)That's it. Everything else is done automatically.ExamplefromconfigparseimportParserparser=Parser(prog='myprogram')parser.add_argument('--short','-s',help='use short format')args=parser.parse_args()As an end userYou can put a configuration file in any of the following locations:~/.config/<prog>/~/.<prog>*SeeFeaturesfor a full overview.ExampleAssume that the programbasictakes the arguments '--short' and '--long'.$cat~/.config/basic/config.yml
short:true$basic
Youchosethe'short'option.
$rm~/.config/basic/config.yml
$echo'long: true'>~/.basic.yml
$basic
Youchosethe'long'option.LimitationsOnly long options will be applied. If a short option is present in a config file,
it will be treated as if it were a long option, i.e. not looked up.
For example, assuming some backend returns the dictionary{'s': 'some value'}:from configparse import Parser

p = Parser(prog='myprog')
p.add_argument('-s', '--short')
args = p.parse_args()
assert args.short is None
assert args.s == 'some value'
Package: config-parser
configparserSimplified runtime configs for PythonExamples can be seen inexamples/To use configparser:pip install git+git://github.com/mattpaletta/configparser.gitYou can call it in your program using:p = Parser(argparse_file = "argparse.yml").get()The paramters are:argparse_file: your argparse definitions, layed out in JSON or yaml files.config_file_key: a string to the optional config file key in the argparse file to use to allow the user to run custom runtime config files.environ_key_mapping: a dictionary containing the config file key to the environment key (bash environment)The arguments will be applied on top of each other in the following order:defaultsconfig files (in the order defined)environment variablesruntimeThis order cannot be modified at this time.
Package: configparser-black
configparser-blackA module to parse configuration for black from common python config files such assetup.cfg,tox.ini, etcInstallpipinstallconfigparser-blackRuncblackorpython-mcblackConfigurationBlack supports pyproject.toml and global configuration natively.This module ignoressetup.cfgandtox.iniblack related configurations if there is a[tool.black]section in yourpyproject.tomlThis module will pass the configuration to black as command line arguments, meaning that it will override any configuration you have in your global black files inWindows~\.blackLinux/MacOS:$XDG_CONFIG_HOME/black(~/.config/blackif theXDG_CONFIG_HOMEenvironment variable is not set)If there is nopyproject.tomlit will lookup for configuration insetup.cfg: as[tool:black]tox.ini: as[black]with the higher number superseeding lower numbers (i.etox.inioverrides any black configuration found insetup.cfg)setup.cfgExample configuration insetup.cfg[tool:black]line-length=100quiet=truetarget-version=py37include=\.pyi?|somerandomfilename$extend-exclude=^/foo.pyRunningcblack--check./black will run withblack--quiet--line-length100--target-versionpy37--include'\.pyi?|somerandomfilename'--check./tox.iniSame configuration intox.ini[black]line-length=79target-version=['py37', 'py38']; Note single and double quotes at the start/end are strippedinclude="\.pyi?$"extend-exclude=^/foo.pyRunningcblack./Similarly black will run withblack will run withblack--line-length79--target-versionpy36--target-versionpy37--include'\.pyi?$'--extend-exclude'^/foo.py'./NotesQuotesQuotes will be stripped from values from start and end. Also there is no need to escape quotes in the middle of a string.e.ginclude="somerandomfile"Will beblack--include"somerandomfile"# Equivalently in bashblack--includesomerandomfileand notblack--include"\"somerandomfile\""If you want to include quotes you can wrap in single if you want double or double if you want single
i.einclude='"somerandomfile"'extend-exclude="'somerandomfile'"will beblack--include"\"somerandomfile\""--extend-exclude"'somerandomfile'"
Package: configparserc
Python (Cython) based implementation of ConfigParser based on POSIX and stdlib functions.
Wrapped via Cython, uses POSIX stat and libc stdio functions for read file.Support converting values in formats:StrType- force convert to string all values (defaults too).IntType- convert values to integer (include suffixes ‘K’, ‘M’ and ‘G’ multiples of 1000).BytesSizeType- convert values to integer size of bytes (include suffixes ‘K’, ‘M’ and ‘G’ multiples of 1024).BoolType- convert ‘False’, ‘false’, ‘True’ and ‘true’ to valid Python bool type.IntSecondsType- convert time to seconds. Uses ‘pytimeparse’ python package.TimedeltaType- convert time to timdelta/relativedelta(if installed). Uses ‘pytimeparse’ python package.ListType- convert separated by symbol (default is comma) string to list of values.JsonType- convert json value to python value.UsageInstall package in your environment:pipinstallconfigparsercExample code for parse ini-config:importosfromconfigparsercimportconfig,toolsclassMainSection(config.AppendSection):"""
    Simple section where:
    *  some_int_key has int value;
    *  some_bool_key has int value;
    *  some_list_key has semicolon separated list value;
    *  some_other_key has int value in bytes.

    and all values appends or override defaults.
    """type_some_int_key=config.IntType()type_some_bool_key=config.BoolType()type_some_list_key=config.ListType(separator=';')type_some_other_key=config.ListType(separator=';')config=config.ConfigParserC(# Override section class for section `main`section_overload={'main':MainSection},# Set deafults for all sections.section_defaults={'main':{'some_int_key':"123",'some_bool_key':"false",'some_list_key':"a;c;d"}},# Allow to use values from environment# via "{ENVIRONMENT_VAR}" values.format_kwargs=os.environ.copy())config.parse_files(['/path/to/ini/config','/other/path/to/ini/config'])config.parse_text('''
[main]
# Support comments
; in different ini formats.
int_key = 1234
''')config_as_dict=config.all()AuthorsAuthor:Sergey Klyuykov <onegreyonewhite@mail.ru>Contributor(s):Kirill Bychkov <kirill970528@yandex.ru>LicenseThe ConfigParserC Project (https://gitlab.com/onegreyonewhite/configparserc)
Copyright (C) 2019-2023 Sergey KlyuykovLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: configparser-list
configparser-listExtends ConfigParser to support lists (getlist)Installpip install configparser-listTestsTo run the tests:python -m unittestExamplesExample 1 usesdictfrom ConfigParserList import ConfigParser


def list_from_dict():
    """
    This example sets the configuration from a dict and then fetchs a list
    :return:
    """
    str_list = ['A', "B", "C"]
    int_list = [1, 2, 3]
    d = {'SEC': {
        'int': 10,
        'float': 1.0,
        'liststr': str_list,
        'listint': int_list}
    }
    conf = ConfigParser()
    conf.read_dict(d)
    alpha = conf.getlist('SEC', 'liststr')
    ints = conf.getlistint('SEC', 'listint')
    print("list from config (dict): ")
    print(f"Alpha {alpha} is of type {type(alpha)}")
    print(f"Ints {ints} is of type {type(ints)}")Example 2 usesstrfrom ConfigParserList import ConfigParser

def list_from_string():
    """
    This example sets the configuration from a string and then fetchs a list
    :return:
    """
    conf_str = """
    [SEC]
    int=10,
    float=1.0,
    liststr=A, B, C
    listint=1, 2, 3
    """
    conf = ConfigParser()
    conf.read_string(conf_str)
    alpha = conf.getlist('SEC', 'liststr')
    ints = conf.getlistint('SEC', 'listint')
    print("list from config (string): ")
    print(f"Alpha {alpha} is of type {type(alpha)}")
    print(f"Ints {ints} is of type {type(ints)}")
Package: configparserplus
configparserplusIf you have to multiple.inifiles (for instance, when dealing with Pyramid's settings) you probably realized that the lack of a decent hierarchy between settings files just sucks.configparserplus allows you to use Jinja2 templating language on your .ini filesso you don't need to ctrl-C, ctrl-V your settings in your N config files. Seriously, never do it again. Just. Never.Usage:Just replace:fromconfigparserimportConfigParser# `from ConfigParser import ConfigParser` in Python2config=ConfigParser()... to:fromconfigparserplusimportConfigParserPlusconfig=ConfigParserPlus()... and refactor your.inifiles to use Jinja stuff (such astemplates inheritance)For more details, please checkthese examples.
Ah! Configparserplusworks normally on non-jinja(boring, regular).inifiles - so you can just replace it and refactor bit by bit.Development:Run linter:pipinstall-rrequirements_dev.txt
isort-rc.
tox-elintRun tests viatox:pipinstall-rrequirements_dev.txt
toxRelease a new major/minor/patch version:pipinstall-rrequirements_dev.txt
bump2version<PART># <PART> can be either 'patch' or 'minor' or 'major'Upload to PyPI:pipinstall-rrequirements_dev.txt
pythonsetup.pysdistbdist_wheel
python-mtwineuploaddist/*Contributing:Pleaseopen issuesif you see one, orcreate a pull requestwhen possible.
In case of a pull request, please consider the following:Respect the line length (132 characters)Write automated testsRuntoxlocally so you can see if everything is green (including linter and other python versions)
Package: configparser-plus
Python |  配置文件++说明在Python中操纵配置文件的模块包是configparser。它一般适用的配置文件的格式是类似于MySQL的参数文件/etc/my.cnf那样的文件的。这种配置文件中的键（Key）与值（Value）一般都是文本形式的静态文件。但更多的时候我们希望配置文件中的值是可以跟着当前所在环境而动态变化的。并且，配置文件最好可以像Linux环境中的环境变量文件~/.bash_profile那样引用之前设置好的变量，而不是从头开始写很多冗余的内容。因此，为了实现上述的两种基本需求，我编写了这样一个Python脚本。在configparser的基础上增加了自定义的语法支持：在配置文件中，引用操作系统命令的执行结果为某个参数的值，使用一对【`】号，框选期望的操作系统命令；在配置文件中，引用配置文件中定义的其他参数的值，使用一对【@】符号，并且引用参数的格式为：
参数的[section]名称.参数的key名称具体的使用方法可以参阅下面的演示部分。演示配置文件[os]
username=Leviathan·利维坦
hostname=<@os.username@>你好，欢迎来到#`hostname`#例如，我希望从上面的配置文件中获取[os]下的hostname参数的值；运行效果如下所示：D:\PyCharm_data\python_config_file_plus\venv\Scripts\python.exe D:/PyCharm_data/python_config_file_plus/config_file_plus.py
===============
<Leviathan·利维坦>你好，欢迎来到#Godzilla#

Process finished with exit code 0可以看到：通过【@】获得了对配置文件中其他参数的引用通过【`】获得了操作系统命令执行的结果
Package: config-patterns
Welcome toconfig_patternsDocumentationconfig_patternsis a Python library that brings config management best practices for production-ready application.Hierarchy Json Pattern for Config Management: allows you to define a hierarchy structure of your config data model, and inherit global config values if a specific config value is not defined.Separate and Merge Non-Sensitive Data and Secret Data: allows you to manage non-sensitive config data and sensitive config data separately and merge them together.Multi Environment Json: allows you to manage configs for multi-environment deployment application.Multi Environment Config Management - SSM Backend: a production ready solution using AWS Parameter Store as the backend for multi-environment config management.Multi Environment Config Management - S3 Backend: a production ready solution using AWS S3 as the backend for multi-environment config management.Installconfig_patternsis released on PyPI, so all you need is:$pipinstallconfig_patternsTo upgrade to latest version:$pipinstall--upgradeconfig_patterns
Package: config-precedence
[![Build Status](https://travis-ci.org/EddyMM/config_precedence.svg?branch=master)](https://travis-ci.org/EddyMM/config_precedence)## Config PrecedencePython library for specifying the order of precedence when fetching configuration values from multiple configuration options.## AuthorEddy Mwenda (mwendaeddy@gmail.com)