Saravanan666/pypi-org huggingface dataset:
Package: confdaora
confdaoraConfigurations using python annotationsDocumentation:https://dutradda.github.io/confdaoraSource Code:https://github.com/dutradda/confdaoraKey FeaturesGenerate aDictDaorawith values parsed from environment variables.RequirementsPython 3.8+dictdaorajsondaoraInstalation$ pip install confdaoraBasic examplefromtypingimportTypedDictfromconfdaoraimportconfdaora_envclassAppConfig(TypedDict):port:inthost:strconfig=confdaora_env(AppConfig)print(config)Suposing your file callsmyconf.py:PORT=8080 HOST=localhost python myconf.py{'port': 8080, 'host': 'localhost'}Complex examplefromdataclassesimportdataclassfromtypingimportListfromconfdaoraimportconfdaora_env@dataclassclassDBConfig:__prefix__='db'host:strport:int=3306@dataclassclassKeyConfig:__prefix__='keys'name:strvalues:List[int]@dataclassclassAppConfig:db:DBConfigkeys:List[KeyConfig]host:strport:int=8080config=confdaora_env(AppConfig)print(config)Suposing your file callsmyconf.py:HOST=localhost \
DB_HOST=localhost \
KEYS_0_NAME=test \
KEYS_0_VALUES=10,20 \
KEYS_1_NAME=test2 \
KEYS_1_VALUES=30,40 \
python myconf.pyAppConfig(db=DBConfig(host='localhost', port=3306), keys=[KeyConfig0(name='test', values=[10, 20]), KeyConfig1(name='test2', values=[30, 40])], host='localhost', port=8080)
Package: confdict
ConfDictConfiguration dictionary that extends built-in python dict with recursive access, self references and fallback functionality. There is no extensive documentation yet, you can check out tests to figure out all features.Example usage.>>>fromconfdictimportConfDict>>>cd=ConfDict(# Configuration of ConfDict, these are default values__separator='/',__self_key='.',__parent_key='..',__root_key='...',__key_key='<key>',__interpolation_regex=r'({{([^{}]*)}})',__fallback_key='fallback',# Remaining arguments will directly be stored in underlying dictusers={# fallback dict is used when a key is not found at that level'fallback':{# <key> is evaluated to key of the current level# it is useful when used with fallback'username':'{{<key>}}',# you can use self references'ssh_private_key':'/home/{{username}}/.ssh/id_rsa',},})>>>cdConfDict{'users':{'fallback':{'ssh_private_key':'/home/{{username}}/.ssh/id_rsa','username':'{{<key>}}'}}}>>>cd['users/john/username']'john'>>>cd['users/john/ssh_private_key']'/home/john/.ssh/id_rsa'>>>cd['users/john']ConfDict{'ssh_private_key':'/home/john/.ssh/id_rsa','username':'john'}>>>cd['users/jean']ConfDict{'ssh_private_key':'/home/jean/.ssh/id_rsa','username':'jean'}>>>cd['users/jean']={'username':'jeans_custom_username'}>>>cd['users/jean/ssh_private_key']'/home/jeans_custom_username/.ssh/id_rsa'>>># 'jean' exists now under 'users'>>># there is no partial fallback so there is no 'ssh_private_key'>>>cd['users/jean']ConfDict{'username':'jeans_custom_username'}>>># we can realize fallback as jean to make concrete values>>>cd['users/fallback'].realize('jean')>>>cd['users/jean']ConfDict{'ssh_private_key':'/home/jeans_custom_username/.ssh/id_rsa','username':'jeans_custom_username'}>>># interpolation still works>>>cd['users/jean/username']='jeans_custom_username2'>>>cd['users/jean/ssh_private_key']'/home/jeans_custom_username2/.ssh/id_rsa'Installation$ pip install confdictDevelopmentThere is aMakefileto automate commonly used development tasks.Environment Setup### create a virtualenv for development

$ sudo pip install virtualenv # or your preferred way to install virtualenv

$ make virtualenv # will also install dependencies

$ source env/bin/activate

### run pytest / coverage

$ make test

### before commit

$ make format
Package: confdoggo
confdoggo 🐶Define your builtin settings:classMySettings(confdoggo.Settings):class_(confdoggo.Settings):host:str="localhost"port:int=8080server=_()class_(confdoggo.Settings):x:int=42client=_()reload_on_changes=Truescheduled_shutdown:datetime=NoneLet confdoggo catch the configuration files, and run extensible type checking:settings=confdoggo.go_catch(MySettings,['file://./simple.json',# a local filePath('.')/'another_one.yaml',# another local file'ftp://192.168.1.1/folder/file.json',# a remote file'https://192.168.1.2/folder/file.ini',# another remote file],)Note: order matters! Configurations that have a higher index have higher importance.Access configuration easily:assertsettings.server.port==8080See a full examplehere.Install$pipinstallconfdoggoUnder developmentThis project is under development: expect breaking changes!
Package: confduino
confduino is anArduinolibrary, programmer, board configuratorLinks:home:https://github.com/ponty/confduinodocumentation:http://ponty.github.com/confduinoFeatures:getArduinoversionlist, install, removeArduinolibrariesinstall libraries from internet or local drivefixexamplesdirectory name before installingclean library (.*,_*,..) before installingmove examples underexamplesdirectoryupgrade library to 1.0: replace#include "wprogram.h"with#include "Arduino.h"list, install, removeArduinoprogrammerslist, install, removeArduinoboardscan be used as a python library or as a console programunpacker back-end:pyunpackdownloader back-end:urllibsome functionality is based onarsconssupported python versions: 2.6, 2.7, 3.3, 3.4supported Arduino versions: 1.0.5Known problems:tested only on linuxsome libraries with unusual structure can not be installedarduino libraries:http://www.arduino.cc/en/Reference/LibrariesBasic usageinstall library:>>> from confduino.libinstall import install_lib
>>> install_lib('http://arduino.cc/playground/uploads/Main/PS2Keyboard002.zip')or on console:python -m confduino.libinstall http://arduino.cc/playground/uploads/Main/PS2Keyboard002.zipinstall a lot of libraries:python -m confduino.libinstall.examples.upgrademanyInstallationGeneralinstallarduinoinstallpythoninstallpipinstall back-ends forpyunpack(optional)install the program:# as root
pip install confduinoUbuntusudo apt-get install arduino
sudo apt-get install python-pip
sudo pip install confduino
sudo apt-get install unzip unrar p7zip-fullUninstall# as root
pip uninstall confduino
Package: conference-radar
conrad — Conference Radarconradhelps you track conferences and meetups on your terminal.Here's how it works:$ conrad showWhy conrad?📅 Never miss CFP deadlines again.conrad remindcan remind you every time you open a terminal!📊 Query and explore events using tags, names, locations, and dates.conrad show --cfpwill tell you about events where the CFP is open!🤖 Crawlers update events twice a week! (Monday and Thursday at 00:00 UTC)InstallationYou can simply use pip to installconrad:$ pip install conference-radarFeaturesContinuous updatesThe event list is maintained indata/events.json. This list is continuously updated by the availablecrawlersusing GitHub Actions.Sources:https://confs.techhttps://pydata.org/event-schedulehttps://github.com/python-organizers/conferenceshttps://wiki.python.org/moin/PythonEventsCalendarSet remindersYou can set CFP reminders so that you never miss a deadline! The color changes based on event proximity;> 30 days,>10 and < 30 daysand< 10 days.$ conrad remind -i 6bb714
$ conrad remindProtip: Addconrad remindto your shell startup file so that you get a reminder every time you open a new terminal!Query and exploreYou can query and explore the event database using various filters.Look at events which have an open call for proposals (CFP):$ conrad show --cfpLook at conferences using a tag:$ conrad show --tag pythonLook at conferences using a name:$ conrad show --name pyconLook at conferences in a city, state or country:$ conrad show --location usaLook at conferences based on when they're happening:$ conrad show --date ">= 2019-10-01" --date "<= 2020-01-01"Refresh event databaseYou can get the latest events using:$ conrad refreshContributingTheContributor's Guidehas detailed information about guidelines around contributions. You can add new crawlers and events toconrad:Adding a crawlerAdding new eventsVersioningconradusesSemantic Versioning. For the available versions, see the tags on this repository.LicenseThis project is licensed under the Apache License, see theLICENSEfile for details.
Package: confetta
confettaInstallation$pip3installconfettaUsagefromosimportenvironasenvfromconfettaimportgit_folder_name,docker_port,docker_hostconfig={"app_name":env.get("APP_NAME",git_folder_name()),"app_host":env.get("APP_HOST",docker_host()),"app_port":env.get("APP_PORT",docker_port("app",80))}print(config)
Package: conf-finder
conf-finderConfiguration file finder.The configuration file/directory is searched for in the following locations by default:The current directoryGit root repository (if the current directory is within a repository)XDG config home ($XDG_CONFIG_HOME; if not set,~/.configis used)Home directoryTo locate the configuration directory, the tool searches for a dot-prefixed
name (e.g., .mytool) in all locations except for the XDG config home.
Within the XDG config home, a name without the dot prefix (e.g.,mytool)
is searched for.If no directory is found, the path under the XDG config home is returned.To locate the configuration file, the tool first searches for a dot-prefixed
file (e.g.,.myconf.txt) in all locations except for the XDG config home.
Within the XDG config home, a file name without the dot prefix
(e.g.,myconf.txt) is searched for. Following this, an attempt is made
to find the file within the located configuration directories.If no file is found, the path under the configuration directory within
the XDG config home is returned.RequirementPython 3.9, 3.10, 3.11Installation$pipinstallconf-finderUsagefromconf_finderimportConfFindercf=ConfFinder("mytool")print(cf.directory())This script searches for:./.mytool/.mytoolif here is under the git repository.$XDG_CONFIG_HOME/mytool(IfXDG_CONFIG_HOMEis not set, use~/.config.)~/.mytoolIf no directory is found, return$XDG_CONFIG_HOME/mytool(or~/.config/mytool).fromconf_finderimportConfFindercf=ConfFinder("mytool")print(cf.conf(exe="toml"))This script searches for:./.mytool.toml/.mytool.tomlif here is under the git repository.$XDG_CONFIG_HOME/mytool.toml(IfXDG_CONFIG_HOMEis not set, use~/.config.)~/.mytool.toml./.mytool/conf.toml/.mytool/conf.toml$XDG_CONFIG_HOME/mytool/conf.toml~/.mytool/conf.tomlfromconf_finderimportConfFindercf=ConfFinder("mytool")print(cf.conf("mytool","toml","myconf"))This script searches for:./.myconf.toml/.myconf.toml$XDG_CONFIG_HOME/myconf.toml~/.myconf.toml./.mytool/myconf.toml/.mytool/myconf.toml$XDG_CONFIG_HOME/mytool/myconf.toml~/.mytool/myconf.tomlIf you wish to search for only files directly placed under the search directories,conf_typeto'file':fromconf_finderimportConfFindercf=ConfFinder("mytool",conf_type="file")print(cf.conf("mytool","toml","myconf"))This script searches for:./.myconf.toml/.myconf.toml$XDG_CONFIG_HOME/myconf.toml~/.myconf.tomlIf no file is found,$XDG_CONFIG_HOME/myconf.tomlis returned.To search for only directories,conf_typeto'dir'instead.
Package: conffu
Conf FuA configuration package that allows you to configure your Python scripts, through a combination of JSON configuration files and command line options, with a minimum of code.InstallInstall the package:pip install conffuNote: on Linux, you may need to installlibffi-devand re-install Python if installation causes a 'No module named_ctypeserror'. This is not specific toconffu, but any package requiring_ctypesin one of its dependencies.If you want to be able to read/write XML configurations as well, there is a dependency onlxml, install using:pip install conffu[xml]ExampleWith the package installed, try running this script:from conffu import Config

cfg = Config({
    '_globals': {
        'temp': 'C:/Temp'
    },
    'temp_file': '{temp}/text.txt',
    'number': 3
})

print(f'The number is {cfg.number}')

cfg.save('example_config.json')After running that, this also works:from conffu import Config

cfg = Config.from_file('example_config.json')
print(f'The number is {cfg.number}')Make a change and save this script asexample.py:from conffu import Config

cfg = Config.from_file('example_config.json').update_from_arguments()
print(f'The number is {cfg.number}')Then try running it like this:python example.py -number 7There's many more options, check the documentation for more examples.CaveatNote thatConfigallows you to do this:fromconffuimportConfigcfg=Config()cfg['test']=1print(cfg.test)# prints 1cfg.test=2print(cfg.test)# prints 2That is, you're allowed to access configuration keys as if they were attributes on the configuration. However, if you try to access a key that happens to also be an attribute on the object, you get the attribute. This has the advantage that the feature doesn't break how objects work in Python, but the disadvantage that you'll need to access keys that have the same name as object attributes using the dictionary syntax. For example:fromconffuimportConfigcfg=Config()# create a new config value acfg['a']=1# change the value of a, accessing it as you would a property / attributecfg.a=2# create a new object attribute bcfg.b=3# this does not change the attribute b, because you're directly accessing a new config value bcfg.['b']=4print(cfg.a,cfg.b)# prints 2 3print(cfg['a'],cfg['b'])# prints 2 4If you don't like this behaviour, consider using theDictConfigclass instead ofConfig- they are identical, except that theDictConfigdoes not have this behaviour and you must always access keys likecfg['test'], orcfg['key.subkey'].If you do like the ability to access configuration values like attributes, you should take care that your code only assigns to existing values (initialise them as 'null' when creating the config from json for example), or that you use the dictionary syntax when assigning values and you only use the attribute syntax for reading values.LicenseThis project is licensed under the MIT license. SeeLICENSE.txt.ChangelogSeeCHANGELOG.md.
Package: conf-generator
Conf-Generator is a tool for specifying and exploring hyper-parameters sets in Machine Learning pipelines defined through configuration files.A typical configuration instance to train a model would look like this:model:resnetlearning_rate:0.01training_epochs:10With Conf-Generator it is possible to specify multiple configurations representing parameter exploration:model:resnet$learning_rate:[0.01,0.005]$training_epochs:[10,20]The$prefix is used to specify the varying parameters. The configurations can be generated with the following snippet:fromconf_generatorimportConfGeneratorexp=ConfGenerator("some/config.yml")forconf,summaryinexp.generate():print(conf)The generator generates the configurations as python dictionary objects:{'learning_rate': 0.01, 'training_epochs': 10, 'model': 'resnet'}
{'learning_rate': 0.01, 'training_epochs': 20, 'model': 'resnet'}
{'learning_rate': 0.005, 'training_epochs': 10, 'model': 'resnet'}
{'learning_rate': 0.005, 'training_epochs': 20, 'model': 'resnet'}The cartesian product is made over the varying parameters if those are defined using lists, we can tie them using dictionaries:model:resnet$learning_rate:{a:0.01,b:0.005}$training_epochs:{a:10,b:20}Output:{'learning_rate': 0.01, 'training_epochs': 10, 'model': 'resnet'}
{'learning_rate': 0.005, 'training_epochs': 20, 'model': 'resnet'}Keys can be joined using|:model:resnet$learning_rate:{a:0.01,b:0.001,c:0.1}$training_epochs:{a|b:20,c:10}Output:{'learning_rate': 0.01, 'training_epochs': 20, 'model': 'resnet'}
{'learning_rate': 0.001, 'training_epochs': 20, 'model': 'resnet'}
{'learning_rate': 0.1, 'training_epochs': 10, 'model': 'resnet'}Nesting is possible:model:resnet$$learning_rate:[{a:0.01,b:0.001},{a:0.05,b:0.005}]$training_epochs:{a:10,b:20}Output:{'learning_rate': 0.01, 'model': 'resnet', 'training_epochs': 10}
{'learning_rate': 0.05, 'model': 'resnet', 'training_epochs': 10}
{'learning_rate': 0.001, 'model': 'resnet', 'training_epochs': 20}
{'learning_rate': 0.005, 'model': 'resnet', 'training_epochs': 20}
Package: confget
confget - parse configuration filesTheconfgetlibrary parses configuration files (currently INI-style
files only) and allows a program to use the values defined in them.
It provides various options for selecting the variable names and
values to return and the configuration file sections to fetch them from.Theconfgetlibrary may also be used as a command-line tool with
the same interface as the C implementation.Theconfgetlibrary is fully typed.Specifying configuration values for the backendsTheconfget.defsmodule defines theConfigclass that is used to
control the behavior of the variousconfgetbackends.  Its main
purpose is to specify the filename and, optionally, the section name for
INI-style files, but other backends may use its fields in different ways.AConfigobject is created using the following parameters:a list of variable names to query (may be empty)filename(str, optional): the name of the file to opensection(str, default ""): the name of the section within the filesection_specified(bool, default false): ifsectionis an empty
string, only fetch variables from the unnamed section at the start of
the file instead of defaulting to the first section in the fileParsing INI-style configuration filesTheconfgetlibrary's "ini" backend parses an INI-style configuration
file.  Itsread_file()method parses the file and returns a dictionary
of sections and the variables and their values within them:import confget

cfg = confget.Config([], filename='config.ini')
ini = confget.BACKENDS['ini'](cfg)
data = ini.read_file()
print('Section names: {names}'.format(names=sorted(data.keys())))
print(data['server']['address'])Letting variables in a section override the default onesIn some cases it is useful to have default values before the first
named section in a file and then override some values in various
sections.  This may be useful for e.g. host-specific configuration
kept in a section with the same name as the host.Theformatmodule in theconfgetlibrary allows, among other
filtering modes, to get the list of variables with a section
overriding the default ones:from confget import backend, format

cfg = format.FormatConfig(['foo'], filename='config.ini', section='first',
                          section_override=True)
ini = backend.BACKENDS['ini'](cfg)
data = ini.read_file()
res = format.filter_vars(cfg, data)
assert len(res) == 1, repr(res)
print(res[0].output_full)

cfg = format.FormatConfig(['foo'], filename='config.ini', section='second',
                          section_override=True)
ini = backend.BACKENDS['ini'](cfg)
data = ini.read_file()
res = format.filter_vars(cfg, data)
assert len(res) == 1, repr(res)
print(res[0].output_full)See the documentation of theFormatConfigclass and thefilter_vars()function in theconfget.formatmodule for more information and for
a list of the various other filtering modes, all supported when
the library is used as a command-line tool.Comments: Peter Pentchevroam@ringlet.net
Package: confguard
confguardSave sensitive configuration files outside project in save place.Simple tool to manage sensitive configuration files outside of a project.Guardproject by moving sensitive files/directories to a safe place
where they can be handled properly. Symlinks replace them.Guard is idempotent, changes to.confguardwill be picked up by re-run.Un-guarding restores original state.State is being kept in.confguardfile.QuickstartUsage:confguard[OPTIONS]COMMAND[ARGS]...Savesensitiveconfigurationinasaveplace

Commands:find-and-linkMissing.confguardfile,trytofinditandlinkit...guardGuardsadirectory.unguardUn-guardsadirectory.Install$pipinstallconfguardChangelogCHANGELOG.mdBSD 3-Clause LicenseCopyright (c) 2021, sysid
All rights reserved.Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package: confi
Comfortable python configs from environment variables.* Validated at **import time**. If you forgot a configuration variable you find out at startup.* One source of configuration for all application code. No more `flask_conf.cfg`, `myconfig.ini`, `.env`, hardcoded constants and variables from `docker-compose.yml`.* Type casting and validation at load time. Do it once and forget.# Quickstart```>>> from confy import BaseEnvironConfig>>> class Config(BaseEnvironConfig):...  DEBUG = ConfigField(processor=strtobool, default=True)...>>> Config.DEBUGTrue```Loads variable `DEBUG` __at import time__ from environment, applies function `string_to_bool` to the value,If variable is not provided uses the default of `True`.# Config field options* `default` - default value, can be anything* `required` - boolean, default `False`. Throws `ConfigError` if value is required, but not provided.* `processor` - callable. Can be used to validate the value* `from_var` - specify environment variable to take value from. If none uses config class property name, __case is important__.# Mocking in testsSince its a global class that can't be instanced it's __very important__ to import it like this:```from package import moduleprint(module.ConfigClass.as_text())```and __not__ like this:```from package.module import ConfigClassprint(ConfigClass.as_text())```The first option allows you to monkey patch the config during testing.Pytest example:```from package.module import ConfigClassclass TestConfig(ConfigClass):passTestConfig.TEST = Truemonkeypatch.setattr('package.module.ConfigClass', TestConfig)```All code accesing `module.ConfigClass` will get `TestConfig`.