Saravanan666/pypi-org huggingface dataset:
Package: config-yourself
config-yourself-pythonconfig-yourselfis a python 2.7+ package to help your application readgo-config-yourself files.Installation# choose if you'd like to use `kms`, `gpg` or the `password` providerpipinstall'config_yourself[kms]'# or go crazy with all of thempipinstall'config_yourself[all]'# with pipenvpipenvinstall'config_yourself[kms]'# with poetrypoetryaddconfig_yourself--extraskmsUsageHere's how to work withconfig_yourselfin python:Basic usageimportconfig_yourselfascy# Load one config fileencrypted_config=cy.load.file("config/test.yml")config=cy.Config(encrypted_config)# now use it like a dict, all secrets have been decryptedprint(config["database"])Complete usage# Let's get a little more creative# `config_yourself` can take a number of config files, merge, and decrypt them# we start with a defaults file, that defines the valid keys for all subsequent files# then, we take a file path provided from the environmentfiles=['config/defaults.yml',os.environ['CONFIG_FILE']]# During development, we might choose to have a SCM-ignored personal file, to apply overrides to our personal tasteifos.path.exists(personal_config_path):files.append('config/personal.yml')# we take every file, deserialize it from YAMLconfigs=[cy.load.file(path)forpathinfiles]# we can also append regular dicts to this listconfigs.append({'MODE':os.environ.get('BACKEND_MODE','tripolar')})# we can also decide to override values straight from the environment...ifos.environ['SHOOT_MYSELF_IN_THE_FOOT']:# config_yourself will parse env values as JSON, so this will turn to Falseos.environ['CONFIG.someService.enabled']='false'configs.append(cy.load.env('CONFIG'))# Take our list of configs, and pass secrets to the decryption providerconfig=cy.Config(*configs,secrets={'password':os.environ['SUPER_SECRET_PASSWORD']})# The resulting merged config is finally decryptedprint(config['someService']['endpoint'])# => "https://super-secure-service.example.com"print(config['someService']['enabled'])# => FalseFrom a Django or Flask applicationWhen using in Flask or Django and you'd like to follow the same pattern above, use the :py:meth:~config_yourself.AppConfigmethod instead:importconfig_yourselfascy# Use AppConfigconfig=cy.AppConfig()# functionally equal to:# Remember to set CONFIG_FILE=./config/production.ymlcy.Config(**["./config/defaults.yml","./config/production.yml",])# assuming CONFIG_FILE="" and an existing "personal.yml" filecy.Config(**["./config/defaults.yml","./config/local.yml","./config/personal.yml",])
Package: confing
Described configuration for large, complex projects.Read the
docs!FeaturesDefine config keys using a nicer API to colander.Get config values as a callable before loading or directly
afterwards.Define multiple ‘confers’ to allow large codebases to be worked on
independently.Quick UsageFirstly, define the key(s) you want to be in the config file. They can
be any type colander supports, even custom types. Builtin types can be
accessed more easily through the includeddatamodule.importconfingfromconfingimportdataconfer=confing.getConfer('my_confer_name')confer.define(data.String(name='secret_key'))Next, load the data for the configuration.loaded=confer.load({'secret_key':'...'})loadedisconfer.loadedLastly, get the key you want out of the config.confer.loaded.secret_key# orconfer.loaded['secret_key']If you need to pass a configuration value to something either at
module-import time or before the config is loaded, you can pass it a
callable that will be the correct value once the config is loaded later.
This will only work if the receiving party doesn’t attempt to resolve
the value before the config is loaded.``python confer.as_callable(‘secret_key’) ```Install for development$pipinstall--editable.ContributingAnyone can help make this project better - readCONTRIBUTIONto get started!LicenseApache 2.0. See theLICENSEfile for more details.
Package: confini
CONFINIConfiguration parser that process all sections and values in allinifiles in a directory.Usageimport confini

c = confini.Config('/path/to/config/dir')
c.process()

print(c.get('FOO_BAR_BAZ'))Value storageThe values are stored in a single key/value dictionary, with section and name separated byunderscoreand all letters transformed to uppercase.Consider this value in an ini section:[foO]
bar_baz = 42This will be stored in theconfinistore withFOO_BAR_BAZas the key.Environment overridesBy default, the value of any environment variable matching a store key will overwrite the corresponding value in the store.A prefix can be provided on instantiation to define a separate namespace for environment variable overrides:>>> os.environ.set('FOO_BAZ_BAZ', 666)
>>> c = config.Config('/path/to/config/dir')
>>> c.process()
>>> print(c.get('FOO_BAR_BAZ'))
666
>>> c = config.Config('/path/to/config/dir', 'XXX')
>>> c.process()
>>> print(c.get('FOO_BAR_BAZ'))
42
>>> os.environ.set('XXX_FOO_BAZ_BAZ', 13)
>>> c = config.Config('/path/to/config/dir', 'XXX')
>>> c.process()
>>> print(c.get('FOO_BAR_BAZ'))
13Required valuesKeys can be set as required, and after processing independently validated:>>> c = config.Config('/path/to/config/dir')
>>> c.require('BAR_BAZ', 'FOO')
>>> c.process()
>>> c.validate()
True
>>> c = config.Config('/path/to/config/dir')
>>> c.require('BAR_BAZ_BAZ', 'FOO')
>>> c.process()
>>> c.validate()
FalseCensoring logsThe string representation of the confini object is a list of all stored values, one on each line.Display of individual values can be suppressed:>>> c = config.Config('/path/to/config/dir')
>>> c.process()
>>> print(c)
FOO_BAR_BAZ = 666
>>> c.censor('BAR_BAZ', 'FOO')
>>> print(c)
***EncryptionValues can beGNUPGencrypted by saving them in individual encrypted files providing the filename as value argument wrapped in a gpg directve:[foo]
BAR_BAZ = !gpg(foo_bar_baz.asc)Decryption mode is on by default, and can be deactivated on instantiation:>>> c = config.Config('/path/to/config/dir')
>>> c.process()
>>> c.get()
666
>>> c = config.Config('/path/to/config/dir', decrypt=False)
>>> c.process()
>>> c.get()
!gpg(foo_bar_baz.asc)The user keyring in the default location is used for decryption, which may be overridden as usual with theGNUPGHOMEenvironment variable.
Package: conf-ini-g
InstallationThis project is published
on thePython Package Index (PyPI)at:https://pypi.org/project/conf-ini-g/.
It should be installable from Python distribution platforms or Integrated Development Environments (IDEs).
Otherwise, it can be installed from a command console:For all users, after acquiring administrative rights:First installation:pip installconf-ini-gInstallation update:pip install--upgradeconf-ini-gFor the current user (no administrative rights required):First installation:pip install--userconf-ini-gInstallation update:pip install--user--upgradeconf-ini-gDocumentationThe documentation is available athttps://src.koda.cnrs.fr/eric.debreuve/conf-ini-g/-/wikis/home.AcknowledgmentsThe project is developed withPyCharm Community.The development relies on several open-source packages
(seeinstall_requiresinsetup.py, if present; otherwiseimportstatements should be searched for).The code is formatted byBlack,The Uncompromising Code Formatter.The imports are ordered byisort…your imports, so you don’t have to.
Package: confire
Confire is a simple but powerful configuration scheme that builds on the configuration parsers of Scapy, elasticsearch, Django and others. The basic scheme is to have a configuration search path that looks for YAML files in standard locations. The search path is hierarchical (meaning that system configurations are overloaded by user configurations, etc). These YAML files are then added to a default, class-based configuration management scheme that allows for easy development.Documentation is available here:http://confire.readthedocs.org/en/latest/
Package: confirm
Simple Python configuration file management.Confirm validates a configuration file (.INI or YAML format) against a YAML
configuration schema.Installation$pipinstallconfirmExample schema file"system":"name":"required":true"description":"Nameofthesystemassociatedwiththeserver.""type":"str""http_server":"listen":"required":true"type":"str""description":"ListeningaddressoftheHTTPserver.""default":"localhost""port":"required":true"type":"int""default":8088"description":"PortoftheHTTPserver.""threading":"initial_pool_size":"description":"Initialnumberofthreadsinthethreadpool.""type":"int""default":10"maximum_pool_size":"description":"Maximumnumberofthreadsinthethreadpool.""type":"int""default":100"deprecated":trueUsage$confirmvalidateexamples/confirm.yamlproject.confError:Missingrequiredsectionsystem.Error:Missingrequiredsectionhttp_server.Warning:Deprecatedoptionmaximum_pool_sizeispresentinsectionthreading!Confirm can also be used for validation as a Python library:fromconfirm.validatorimportvalidator_from_config_file...result=validator_from_config_file(config_file_path,schema_file_path)result.validate()print(result.is_valid())LicenseMIT License.
Package: confirms
Confirms PackageOverviewTHIS PACKAGE CONTAINS RESEARCH CODE AND IS NOT INTENDED FOR PRODUCTION USEThis package contains research code that can perform AI comprehension of trade
confirmations, model source code, and model documentation for the purposes of
model governance.The objective is to support the following use cases:Validation of trade capture using LLM comprehension of trade confirmationsValidation of model documentation using LLM comprehension of source codeValidation of source code, identifying bugs and deviations from the approved methodologyLLM generation of model documentation and release note draftsInstallation on GPUSet environment variables FORCE_CMAKE=1;CMAKE_ARGS=-DLLAMA_CUBLAS=onNote: In PyCharm, use Settings > Tools > Terminal > Environment variablesRun 'pip install --upgrade --force-reinstall llama-cpp-python --no-cache-dir'After this run 'pip install -r requirements.txt'CopyrightEach individual contributor holds copyright over their contributions to the
project. The project versioning is the sole means of recording all such
contributions and copyright details. Specifying corporate affiliation or
work email along with the commit shall have no bearing on copyright ownership
and does not constitute copyright assignment to the employer. Submitting a
contribution to this project constitutes your acceptance of these terms.Because individual contributions are often changes to the existing code,
copyright notices in project files must specify The Project Contributors and
never an individual copyright holder.
Package: confiskus
Confiskus is ini-file parse helper with simple inheritance feature.Install$pipinstallconfiskusUsageInheritance is accomplished byextendsoption indefaultsection.Content ofdev_conf.ini.[default]
extends = base.ini

[webservice]
url = https://localhost:6543Content ofbase.ini.[webservice]
user = web_service_user
password = papluhaogrcalmikrpce
url = https://ws.otherserver.comNow while readingdev_conf.iniconfiskus will pick up alsobase.ini.>>>importconfiskus>>>config=confiskus.Confiskus().read('dev_conf.ini')>>>config.get('webservice','url')'https://localhost:6543'>>>config.get('webservice','user')'web_service_user'
Package: confix
ConfixQuick linksHome pageDocumentationBlogForumDownloadAboutConfix is a language-agnostic configuration parser for Python.
It lets you define the default configuration of an app as a standard Python
class, then overwrite its attributes from a static configuration file (be it
YAML, JSON, INI or TOML) and / or viaenvironment variables.
In doing so it validates the overridden settings by:making sure they are of the same type(optional) marking them as mandatory (useful for passwords)(optional) validating them via a callableExample:config file:# config.ymlpassword:secretpython file:# main.pyfromconfiximportregister,parse@register()classconfig:username='ftp'password=Noneparse('config.yaml')print(config.username)print(config.password)shell:$pythonmain.pyftpsecretFor more examples seedocs.Main featuressupportsYAML,JSON,INIandTOMLserialization formats.can be easily extended to support other formats.support for Python 3small code base100% test coverageallows you to define ‘schemas’ in order tovalidatefields and mark them
asrequired:# ftp.pyfromconfiximportregister,schema@register()classconfig:port=schema(default=21,validator=lambdax:isinstance(x,int))password=schema(required=True)StatusCode is solid and fully tested (100% coverage). Its API may change (break)
between major versions though.
Package: confiy
confiyConfiy is easiest way to read config file only with key.#####Caution:
You must create a config file where you need to call, with any extension but .cnf is better and then write your configs in file such as following lines:my_prjdbconf.cnfkey1=1234key2="string with value2"key3="string with value3"connector.pyfromconfiy.confiyimportconfiyprint(confiy().getValue(key='key1'))Easy to install and easier to useUse python version >= 2.7
Package: confjson
confjsonWhat is it?A bafflingly simple, JSON-backed configuration manager for Python programs.Why is it?I kept implementing roughly the same thing from scratch in my various projects, so I figured it was time to do it properly.User guideTheconfjson.Configclass is similar to a ChainMap, and works by means of two JSON files in the same directory:default.config.jsonThe default config file is read-only as far as confjson is concerned. To add default settings, manually edit the file.If the file does not exist, there are no defaults.This file will typically be version controlled along with the code.user.config.jsonAny changes made to the config (and saved) at runtime end up in this file.If the file does not exist, it will be created when changes are saved.User settings take priority over default settings.This file should probably be added to .gitignore or such.
The names of both files are configurable. The above names are the defaults.InitializationThe path given when initializing the Config object can be either a directory or a file. If it refers to a file, confjson will look for config files in the containing directory. The reason for this is that it enables the pattern of using__file__to find config files in the same directory as the program.config=confjson.Config(__file__)config=confjson.Config(".")config=confjson.Config("./configs",user_config_filename=f"{os.getenv('username')}.cfg",default_config_filename="global.cfg",)Data accessItems in the confjson config are accessed as in a dict.if"username"inconfig["user"]:do_something(config["user"]["username"])config["user"]["something_count"]+=1It is also possible to access items as attributes,unless they share a name with a method of the Config class.config.my_key="my value"PersistenceThe load() method (re-)loads the Config object with values from the backing JSON files. Loading is also performed on initialization, so this is mainly for discarding changes.config.load()The save() method saves any changed or added itemsto user.config.json only.config.save()Version history1.3.0Made filenames of both user.config.json and default.config.json configurable.Addeduse_placeholdersargument to Config class. When True, doesn't raise KeyError on attempted access to a nonexistent key, instead returning a placeholder. Assignments of keys to a placeholder will propagate up through the hierarchy and add real dicts as needed.1.2.2Addedkeys(),get(key, default)and__contains__(key)to ConfigItemProxy to fix a few problems caused by the previous change.1.2.1Improved attribute-style access and enabled mixed style access.1.2.0Enabled attribute-style access to config items.1.1.0Fixed handling of nested dicts.Added check to prevent insertion of JSON-incompatible values right away rather than fail on save.Added some more dict-like dunder methods.1.0.1Changed__init__to also load the config files.1.0.0Initial release.
Package: conflagrate
🔥 ConflagrateBuild applications from control flow graphs, rather than the other way around.Define your application flow with aGraphvizdiagramWrite the code for each node as a decorated Python functionRun💾 InstallationFromPyPIusingpip:pip install conflagrateFrom source:pip install .orpython setup.py installSee the examples directory of theGitHub
repositoryfor sample code.💻 Dependenciesconflagrateis built entirely in Python and only depends on external
libraries for diagram parsing.  Currently onlyGraphvizis supported:pydot: for parsing the control flow graph
Package: conflateddict
This module contains classes to assist with conflating streaming data. This can be used to manage the load on consuming tasks, and is especially useful if the consumers only need the current value and can thus safely discard intermediate updates.Example:>>> from conflateddict import ConflatedDict
>>> import random
>>>
>>> keys = ['red', 'green', 'blue', 'orange']
>>> con = ConflatedDict()
>>> for _ in range(100):
...    con[random.choice(keys)] = random.randint(0, 100)
...
>>> print(list(con.items())
[('orange', 32), ('green', 71), ('red', 71), ('blue', 80)]
>>> print(len(con))
4
>>> # After a reset, there will be no dirty values
>>> con.reset()
>>> print(list(con.items())
[]
>>> print(len(con))
0
>>> # After another update, any new dirty values will be returned
>>> con[random.choice(keys)] = random.randint(0, 100)
>>> print(list(con.items())
[('orange', 58)]
>>>
>>> # We still have access to all the values through data()
>>> print(list(con.data().items()))
[('blue', 80), ('red', 71), ('green', 71), ('orange', 58)]
>>> print(len(con.data()))
4
>>>
Package: conflex
ConflexFlexible, extensible configuration reader for Python 3.6+ projects for multiple tree-like config sources.IntroductionConflexmeans "flexible configuration" it is a tool for parsing tree-like configuration with
any level of depth. Thus, here the configuration is a tree structure with two types of nodes:SectionandOption.Sectionsis used for grouping other nodes andoptionis a key-value
pair. As it mentioned above depth is unlimited,sectioncan have a childsectionsmoreoveroptionscan have childoptionsorsections. Checkout the "test/*' files for a more extended
examples.Theoptioncan contain list or single value. If list-typedoptioncontains single value it
is not cause an error this value will be treated as list with one element.The input data isdictthat contains tree representation for example{ section : { key0 : value0,  child_section { key00: value00, key01: value01 } } }. YAML and JSON parsers returns that kind of
object.Basic usage# app/config.pyimportconflexdefget_sourse(filename)->dict:"""Function that returns parsed to`dict` configuration.For example:{'main': {'master_ip': '192.168.0.1', 'master_port': 42}}"""...defload_config()->Config:config=Config(('main'>>Section()<<('master_ip'<<OptValue(iv_default='127.0.0.1'),'master_port'<<OptVInt(iv_required=True),'packet_size'<<OptVInt(iv_default='1KB')<<('source'<<OptVChoice(iv_default='conf',il_mapping={'conf':0,'arg':1})))))sources=[]sources.append(get_sourse('app_default.conf'))sources.append(get_sourse('app.conf'))config.load_dicts(sources)returnconfig# app/main.pyfromapp.configimportload_configSRC_CONF=0SRC_ARG=1config=load_config()print(config['main/master_ip'])sub_config=config.knot('main')print(sub_config['port'])ifsub_config['packet_size/source']==SRC_CONF:print(sub_config['packet_size'])# will output `int` 1024print(dict(config.items()))Installationpipinstallconflex
Package: conflib
conflib=========[![Latest Version](https://img.shields.io/pypi/v/conflib.svg)](https://pypi.python.org/pypi/conflib/)[![Coverage Status](https://img.shields.io/coveralls/akerl/conflib.svg)](https://coveralls.io/r/akerl/conflib)[![Build Status](https://img.shields.io/travis/akerl/conflib.svg)](https://travis-ci.org/akerl/conflib)[![MIT Licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)Simplifies configuration stacking. Primarily, this was written to allow stacking of default, global, and local settings. It allows for validation so that you can enforce contraints on supplied options.## UsageUsing conflib is just a matter of importing it and giving it some dictionaries to stack:```>>> import conflib>>> Default = {'hello': 'world', 'alpha': 5}>>> Global = {'wat': 'wut', 'fancy': (20, 'fish')}>>> Local = {'hello': 'everybody', 'beta': 'qwerty'}>>> Config = conflib.Config(Default, Global, Local)>>> print(Config.options){'alpha': 5, 'wat': 'wut', 'beta': 'qwerty', 'hello': 'everybody', 'fancy': (20, 'fish')}```If you need to stack on new configs later, go for it:```>>> Config.stack({'wat': 'new_value', 'extra': 10})>>> print(Config.options){'alpha': 5, 'wat': 'new_value', 'beta': 'qwerty', 'hello': 'everybody', 'fancy': (20, 'fish'), 'extra': 10}```Pass in a validation dictionary if you want to check the provided arguments:```Validator = {'alpha': lambda x: x < 10,'fancy': tuple,'beta': [('asdf', 'qwerty'), ('fizz','buzz')]}Config.validate(Validator)```Alternately, you can pass in a validation\_dict when creating a Config object. Validation failures raise ValueError with a message indicating the specific failure. There are several available options for the Validation dictionary:* `bool`: Converts 'y', 'yes', '1', 1, and True to True, and 'n', 'no', '0', 0 and False to False* `int`: Casts provided value as an integer* A list of tuples: looks for the provided value as a member of any of the tuples, and returns the first item in that tuple* A list: looks for the provided value in the list* Any type (`str`, `float`, etc): validates that the provided value is of the specified type (does not try to cast it)* A callable: Runs the provided function, which should either return the validated value or raise TypeError## Installationpip install conflib## Licenseconflib is released under the MIT License. See the bundled LICENSE file for details.