Saravanan666/pypi-org huggingface dataset:
Package: configfiles
configfilesA system to synchronize configuration files across multiple machines, the smart way.Installation$ pip install configfiles

or

$ pip install -r requirements.txt
$ python setup.py installDesignconfigfilesworks on a model of storing and incrementally updating config files, or more accurately scripts to update config files.
These scripts are usually autogenerated from file changes, but can be customized to do things like install dependencies or fill-in system
specific information.Unlike git, the updates to these files are stored as a sequence of scripts, as opposed to a graph of diffs. This makes for less powerful
branching, but a much simpler internal model. In future versions this may be amended, but it works better for something based around scripts.The scripts in question are not actually shell scripts, rather small pieces of python for better interoperability. Most of the time they are
auto-generated.Be aware that when using configfiles you open yourself to running arbitrary python code at the same privilege as your account, and
be sure to onlysyncto trusted reposUsageThere are a few main operations in configfiles, the first beingsync, which updates a system to the latest version of a config repo.Do note that oncesync-ed to a repo, one mustdesyncto use another one$ configfiles sync config.someserver.url:repo/pathThe server path may be omitted to use the lastsync-ed server.To update a configfiles repo, one may use theupdateoperation, which takes the diff of a file and adds it as a script. The net result
is that the file is "checked-in" to the repo.$ configfiles update .zshrcDo note that configfiles paths operate relative to the current user folder by default, andupdatewill warn against adding files below the home directory.To use a custom python script as an update method, useadd.$ configfiles add my_updater.py modifies_file.rcScripts are ran in the home directory, with full access guaranteed to the configfiles public API.To revert a change made bysync, userollback.$ configfiles rollback <number of changes>

or (with caution)

$ configfiles rollback --remote <number of changes>Do note that rollback only cares about files, and there is currently no way to create transactional scripts (i.e. a custom rollback script)
The main purpose of the scripting functionality is to customize files for machine-specific things, which is why it is designed this way.Before using any of the above, a configfiles repo must beinit-ed.initcreates a new repo with no additional scripts.$ configfiles init config.someserver.url:repo/path
$ configfiles sync config.someserver.url:repo/path
$ configfiles update .zshrc <etc>Further documentationTODO, refer to code comments for more informationServer requirementsA server hosting a configfiles repo must support sftp, and that is it. There is no "configfiles server", the entire system's code is client-onlyChangelog0.3.1:bugfixes0.3.0:added ability to sync specific number of timesbugfixes0.2.1:bugfix release0.2.0:initial release
Package: config-files-validator
# config-files-validator
A command line tool to validate configuration language files and template files. So far json, yaml, jinja2, and toml are supported. The tool validates
the files by trying load them one by one. Result can be converted to xunit xml report.## Example of usage with json files`validate-json-filesexample1.json example2.json `## Example of usage with yaml files`validate-yaml-filesexample1.yaml example2.yaml `## Example of usage with jinja2 files`validate-jinja2-filesexample1.j2 example2.j2 `## Example of usage with jinja2 files and extensions`validate-jinja2-files--j2-extensions=jinja2.ext.do,jinja2.ext.i18nexample1.j2 example2.j2 `## Example of usage with toml files`validate-toml-filesexample1.toml example2.toml `## Example of xunit xml report
This will generate an xunit xml report file named testreport.xml`validate-yaml-filesexample1.yaml example2.yaml--xunit`This will generate an xunit xml report file named myxunit.xml`validate-yaml-filesexample1.yaml example2.yaml--xunit--xunit-output-file=myxunit.xml`## Requirements
The tool requires version 3.8 or higher of Python.![ci](https://github.com/feffe/config-files-validator/workflows/CI/badge.svg?branch=master)
Package: configflow
OverviewOverviewInstallationOptional dependenciesExamplesSee Alsoconfigflow– is the configuration management package.InstallationInstallation is as simple as:pipinstall-Uconfigflow

poetryaddconfigflowOptional dependenciesconfigflowhas next optional dependencies:If you are usingVault by HashiCorpas a config source you can addhvac.To install these along withconfigflow:pipinstall-U"configflow[hvac]"poetryadd"configflow[hvac]"Of course, you can also install these requirements manually withpip install ... | poetry add ....ExamplesSee Also
Package: config-formatter
config-formatterAn automatic formatter for .ini and .cfg configuration files.Installationpipinstallconfig-formatterUsagefromconfig_formatterimportConfigFormatterwithopen("config.ini","r")asfile:formatter=ConfigFormatter()formatted=formatter.prettify(file.read())print(formatted)ExampleBefore:[main]        # Comments are preserved.# Error-prone indentation is removed.[section1]key1:value1key2=value2# Value assignment is normalized.[section2]lists=areindented# includingcommentsmultiline=text that spanson several linesis properly aligned.After:[main]  # Comments are preserved.# Error-prone indentation is removed.[section1]key1=value1key2=value2# Value assignment is normalized.[section2]lists=areindented# includingcommentsmultiline=text that spanson several linesis properly aligned.
Package: configg
ConfiggIntroductionSimple wrapper module for reading/writing config data like a native python dictionary. Multiple backends provide an identical interface to various file formats (change one line to switch between json & xml).Data is arranged into sections, and then by key:value pairs (like a traditional .ini file). This arrangement is consistent across all backends and file formats. Keys must be strings, and values must be strings or values (int, float etc).Supported Backendsinixmljsonyml (planned)sqlite3 (planned)UsageHere is an example ini config file, "myconfig.ini".[user]username=Peterid=5531274123[database]type=mongodbip=12.34.56.78Example loading myconfig.ini, and manipulating the data.fromconfiggimportConfigg,XML_BACKEND,JSON_BACKEND# Instantiate Configgcfg=Configg("myconfig.ini")# Pull data from user sectionusername=cfg.user["username"]# Add data to the user sectioncfg.user["token"]="apples"# Pull data from the database sectiondb_ip=cfg.database["ip"]# Add new section, with new datacfg.add_section("app_settings",{"resolution":"1024x768"})# Remove sectioncfg.remove_section("app_settings")# Commit local changes to filecfg.commit()# Reload local data from filecfg.reload()# Create new xml configcfg_xml=Configg("myconfig.xml",data_backend=XML_BACKEND)# Create new xml configcfg_json=Configg("myconfig.xml",data_backend=JSON_BACKEND)
Package: configgery-client
Configgery Python clientInstall$pipinstallconfiggery-clientGetting StartedThis library allows you to fetch the latest set of configurations for your client.First, create a client atconfiggery.comand store the generated API key in a safe place.
Then, once you've added configurations to your Client Group,
you can fetch those same configurations.Fetching configurationsfromconfiggery.clientimportClientclient=Client(API_KEY,"/path/to/store/configurations")client.download_configurations()Checking if up-to-datefromconfiggery.clientimportClientclient=Client(API_KEY,"/path/to/store/configurations")client.check_latest()print(client.is_download_needed())Using a configurationfromconfiggery.clientimportClientclient=Client(API_KEY,"/path/to/store/configurations")success,data=client.get_configuration('myconfiguration.json')ifsuccess:print(data)else:print('Could not find configuration')Updating statefromconfiggery.clientimportClient,ClientStateclient=Client(API_KEY,"/path/to/store/configurations")client.download_configurations()client.update_state(ClientState.Configurations_Applied)ifdevice_happy():# your own checkclient.update_state(ClientState.Upvote)else:client.update_state(ClientState.Downvote)
Package: config-guiosoft
GS PY ConfigConfiguration classUsageCreate your configuration class, extending config_guiosoft.ConfigClassfromconfig_guiosoftimportConfigClassfromdatetimeimportdatetime,timeclassConfig(ConfigClass):STRING_CONF="DEFAULT VALUE"INT_CONF=10FLOAT_CONF=0.0BOOL_CONF=FalseDATE=date.today()DATETIME=datetime.now()config=Config()print(config)>>>__main__.Config(BOOL_CONF:False,DATE:datetime.date(2020,7,30),DATETIME:datetime.datetime(2020,7,30,18,39,55,374515),FLOAT_CONF:0.0,INT_CONF:10,STRING_CONF:'DEFAULT VALUE')When this class is instantiated, it loads values from environment variables with same name.
If the variable is undefined, default values will be used.Advanced usageYou can use ConfigType for special field behavior.fromconfig_guiosoftimportConfigClass,ConfigTypefromdatetimeimportdatetime,timeclassSpecialConfig(ConfigClass):STRING_CONF=ConfigType('STRING_CONF',str,'DEFAULT_STRING',lambdavalue:len(value)>1)INT_CONF=ConfigType('INT_CONF',int,100,range(1000))FLOAT_CONF=ConfigType("FLOAT_CONF",float,0.5,[0,0.1,0.5,3.14])BOOL_CONF=ConfigType("BOOL_CONF",bool,False)DEFAULT_CONF=ConfigType("DEFAULT_CONF")DATE=ConfigType("DATE",date,date.today(),lambdavalue:value<=date.today())DATETIME=ConfigType("DATETIME",datetime,datetime.now(),lambdavalue:value<=datetime.now())# ConfigType constructorConfigType(env_name:str,type=str,default=None,validation:callable=None)FieldDescriptionenv_nameEnvironment variable name, string, requiredtypepython type (str, int, float, bool, datetime, date)defaultdefault value (must be compatible with type)validationcallable to validate data
Package: configgy
ConfiggyA subtle Python package for loading configuration files without having to specify the file type.InstallationYou can install the package from PyPI using pip:pipinstallconfiggyUsageHere's an example of how to use the package to load a configuration file:fromconfiggy.loaderimportConfigLoaderdata=ConfigLoader().load_config_file("file.json")Theload_configfunction takes a single argument, the path to the configuration file. It will automatically detect the file type and use the appropriate loader.Currently, the package supports the following file types:INIYAMLTOMLJSON
Package: configi
Configi is a straightforward wrapper for configuration data. It provides a consistent interface to a number of back-ends, currently via arbitrary HTTP JSON loading, Redis K/V store, and S3 JSON file loading.Using ConfigiThe code itself is documented, but here’s a couple of recipes:S3 Config SourcefromconfigiimportDynamicConfig,S3ConfigSourceimportboto# Boto not included, but if you want to use S3ConfigSource# you probably have it already. I hope.s3=boto.connect_s3()bucket=s3.get_bucket("my-config-repository")config_file_key=bucket.get_key("my-config-file-key")source=S3ConfigSource(config_file_key)config=DynamicConfig(source,expiry=(60*4),# Every four hours reloadquiet_mode=True,# Errors will `print` instead of throwing Exceptions.namespace_dicts=True,# Turn dictionaries into dot-accessible namespaces.defaults={'some_key':'a_value'}# Defaults dict is used to return values, if a key is unset remotely.)printconfig.foo>Noneconfig.foo='bar'printconfig.foo>barprintconfig.some_key>a_valueconfig.some_key='banana'printconfig.some_key>bananaRedis Config SourcefromconfigiimportDynamicConfig,RedisConfigSourceimportredis# Redis not included, but if you want to use# RedisConfigSource, then you'll need it.r=redis.StrictRedis()# Get a Redis connection. Yours will have more parameters.source=RedisConfigSource(r,prefix='MY_AWESOME_CONFIGI_CONFIG_SETUP:')# Default prefix is 'CONFIGI:'config=DynamicConfig(source,expiry=(60*4),# Every four hours reloadquiet_mode=True,# Errors will `print` instead of throwing Exceptions.namespace_dicts=True,# Turn dictionaries into dot-accessible namespaces.defaults={'some_key':'a_value'}# Defaults dict is used to return values, if a key is unset remotely.)printconfig.foo>Noneconfig.foo='bar'printconfig.foo>barprintconfig.some_key# Even though defaults were passed, any remotely-set value overrides.>orangutanJSON File Config SourcefromconfigiimportDynamicConfig,JSONConfigSourcesource=JSONConfigSource("https://some-url.com/my-config-file.json")config=DynamicConfig(source,expiry=(60*4),# Every four hours reloadquiet_mode=True,# Errors will `print` instead of throwing Exceptions.namespace_dicts=True,# Turn dictionaries into dot-accessible namespaces.defaults={'some_key':'a_value'}# Defaults dict is used to return values, if a key is unset remotely.)printconfig.foo>Noneconfig.foo='bar'>DynamicConfigError:CouldnotsetkeyfooCaveatsSome of the config sources are better suited for read-only config. Namely, the arbitrary-JSON-file-based config is strictly read-only. The S3-based config is read/write but not very optimal for high-write scenarios. Redis, if a Redis store is both secure and available to you, is probably your best bet.
Package: configilm
ConfigILMThe libraryConfigILMis a state-of-the-art tool for Python developers seeking to rapidly and
iteratively develop image and language models within thepytorchframework.
Thisopen-sourcelibrary provides a convenient implementation for seamlessly combining models
from two of the most popularpytorchlibraries,
the highly regardedtimmandhuggingface🤗.
With an extensive collection of nearly1000 imageandover 100 language models,
with anadditional 120,000community-uploaded models in thehuggingface🤗 model collection,ConfigILMoffers a diverse range of model combinations that require minimal implementation effort.
Its vast array of models makes it an unparalleled resource for developers seeking to create
innovative and sophisticatedimage-language modelswith ease.Furthermore,ConfigILMboasts a user-friendly interface that streamlines the exchange of model components,
thus providing endless possibilities for the creation of novel models.
Additionally, the package offerspre-built and throughput-optimizedpytorch dataloadersandlightning datamodules,
which enable developers to seamlessly test their models in diverse application areas, such asRemote Sensing (RS).
Moreover, the comprehensive documentation ofConfigILMincludes installation instructions,
tutorial examples, and a detailed overview of the framework's interface, ensuring a smooth and hassle-free development experience.For detailed information please visit thepublication(comming soon) or thedocumentation.ConfigILMis released under theMIT Software LicenseContributingAs an open-source project in a developing field, we are open to contributions, whether it be in the form of a new or improved feature or better documentation.For detailed information on how to contribute, seehere.CitationIf you use this work, please cite@software{lhackel_tub_2023,author={Hackel, Leonard andClasen, Kai Norman andDemir, Begüm},title={ConfigILM},month=sep,year=2023,note={{If you use this software, please cite it using themetadata from this file.}},publisher={Zenodo},version={v0.4.8},doi={10.5281/zenodo.8360104},url={https://doi.org/10.5281/zenodo.8360104}}AcknowledgementThis work is supported by the European Research Council (ERC) through the ERC-2017-STG
BigEarth Project under Grant 759764 and by the European Space Agency through the DA4DTE
(Demonstrator precursor Digital Assistant interface for Digital Twin Earth) project and
by the German Ministry for Economic Affairs and Climate Action through the AI-Cube
Project under Grant 50EE2012B.
Package: config-injector
config-injectorConfig-injector is a very simple framework which aims to do only two things: (1) define configurable functions and (2) inject configuration data into those functions at runtime.InstallationInstall with pip.pipinstallconfig-injectorGetting StartedAnnotate any callable as a configurable function using@config. Note that the@configdecorator requires that you provide callable functions for each argument. These callable functions should return the expected type. The object is to break all arguments down to fundamental types: string, integer, float or dictionary.fromcollectionsimportnamedtuplefromtypingimportText,Dict,SupportsIntfrompathlibimportPathfromconfig_injectorimportconfig,InjectorMockThing0=namedtuple("MockThing0",["arg_1","arg_2","arg_3","arg_4"])@config(arg_1=str,arg_2=str,arg_3=str,arg_4=str)defmock_thing_0(arg_1:Text,arg_2:Text,arg_3:Text,arg_4:Text):returnMockThing0(arg_1,arg_2,arg_3,arg_4)@config(arg_5=int,arg_6=int,arg_7=int,arg_8=int)defmock_thing_1(arg_5,arg_6,arg_7,arg_8):return{"key_a":arg_5,"key_b":arg_6,"key_c":arg_7,"key_d":arg_8}@config(t0=mock_thing_0,t1=mock_thing_1,arg_9=str)defmock_things(t0:MockThing0,t1:Dict[SupportsInt],arg_9:Text):return(t0,t1,arg_9)defget_things(config_file=Path("config.json")):injector=Injector()injector.load_file(config_file)returninjector["things"].instantiate(mock_things)Now that the configurable functions are annotated, we can write a configuration for them.{"things":{"t0":{"arg_1":"a","arg_2":"b","arg_3":"c","arg_4":"d"},"t1":{"arg_5":1,"arg_6":2,"arg_7":3,"arg_8":4},"arg_9":"e"}}This configuration file can be loaded in the runtime portion of our implementation usingget_things()to instantiate the configured objects created by our functions.PolymorphismIt is common to want to determine the implementation at runtime. This can be accomplished by delaring the class of an argument as a tuple of multiple types.fromconfig_injectorimportconfig,InjectorclassBaseClass:...classImplementationA(BaseClass):...classImplementationB(BaseClass):...@config()defimplementation_a():returnImplementationA()@config()defimplementation_b():returnImplementationB()@config(t0=(implementation_a,implementation_b))defmock_thing(t0):return{"t0":t0}# Instantiate using implementation a.mock_thing_using_a=Injector({"t0":{"type":"implementation_a"}}).instantiate(mock_thing)# Instantiate using implementation b.mock_thing_using_b=Injector({"t0":{"type":"implementation_b"}}).instantiate(mock_thing)Environment Variable InterpolationConfigurations can contain environment variables for any value. Variables shall be placed within braces${VAR_NAME}and use only letters and underscores. For example, for the following configuration, the environment variables would be interpolated.{"db":{"url":"${DB_URL}","user":"${DB_USER}","password":"${DB_PASSWORD}",}}
Package: configirl
Welcome toconfigirlDocumentationIf you are looking for technical support, click the badge below to join this gitter chat room and ask question to the author.What isconfigirlWhat problem doesconfigirlsolveWhat isconfigirlconfigirlis asingle script, pure python, no dependencies, python2.7, 3.4+ compatible, drop in readypython library to help youmanage complex config value logic. This devops solution applies toANY PROJECT, ANY PROGRAMMING LANGUAGE.fromconfigirlimportConfigClass,Constant,DeriableclassConfig(object):PROJECT_NAME=Constant()PROJECT_NAME_SLUG=Deriable()@PROJECT_NAME_SLUG.getterdefget_project_name_slug(self):returnself.PROJECT_NAME.get_value().replace("_","-")config=Config(PROJECT_NAME="my_project")What problem doesconfigirlsolveDevops Engineer has to deal with lots of config and parameters everyday. Some config value are just a constant value, like a integer and a string. Some config value can be derived from other config values, sometimes event requires the context.There are lots of Devops tools available in the community, such as:Shell Script for command line tool, automationJenkins groovy for CI/CDCloudformation for Infrastructure as CodeTerraform for Infrastructure as Code…They all using different language and different syntax. The method of managing config value in different tools varies very much! If you have to manage a list of config values, and you are using multiple devops tools in the same project. Allow those tools talk to each other is NOT EASY at all. And the effort to manage config value in certain tools might be very difficult (like CloudFormation).configirlprovides a solution to manage complex logic for config values in an elegant way. Since Python is easy to learn and it is full featured programming language, you got the perfect balance of simplicity and flexibility. To integrate with any Devops tools, you just reference the value from the finalized config JSON file.
Package: config-joker
config-jokerA package to ease usage of different configuration conditions in your projects.How to use inObs.: There are some examples in theexamples folderImport the sources you'll use and the Config class:from config_joker Config, EnvironmentSourceInitialize the config class implementing the sources you want to use:config = Config(
        sources=[
            EnvironmentSource()
        ]
    )Find the configurations you want to use:import os
os.environ['env_variable'] = '1'
number_one_from_env_source_as_int = config.required(key='env_variable', value_type=int)The value stored in number_one_from_env_source_as_int will be the number one as an integer.
Package: configjs
configjsconfigjs is a Python package designed to simplify the process of reading and accessing configuration settings stored in a JSON file.
With configjs, you can effortlessly load a "config.json" file from the working directory and access its contents using the package name as attributes.InstallationInstall configjs using pip:pipinstallconfigjsUsageCreate a "config.json" file in your project's working directory with the desired configuration settings in JSON format:{"database":{"host":"localhost","port":5432,"username":"user","password":"secret"},"api_key":"your_api_key"}Import and use configjs in your Python code:fromconfigjsimportConfig# Load the "config.json" fileconfig=Config()# Access configuration settings using the package name as attributesdb_host=config.database.hostdb_port=config.database.portdb_username=config.database.usernamedb_password=config.database.passwordapi_key=config.api_keyprint(f"Database Host:{db_host}")print(f"Database Port:{db_port}")print(f"Database Username:{db_username}")print(f"Database Password:{db_password}")print(f"API Key:{api_key}")Replace the attribute names (database, host, port, username, password, api_key) with your actual configuration structure.Notesconfigjs assumes that the "config.json" file is in the working directory.
The package name itself (config) is used as the top-level attribute to access the configuration settings.
Feel free to customize "config.json" based on your project's needs and easily manage your configuration settings using configjs.
Package: config-json
Config-JsonAn Easier Way to work with JSON configsthis library provide some top level method to make it easy to work with jsonLink: https://pypi.org/project/config-json/How to Use?fromjconf.configimportConfig# u can either doc=Config(config_name="main.json")# default name is main.json# orwithConfig(config_name="main.json")asc:passfunctions availablefromjconf.configimportConfigc=Config(config_name="main.json")# returns all the keys from a json filec.keys()# returns all the values from a json filec.values()# gets the key from a json filec.get('car')# deletes a key from a json filec.delete('car')# update a value in a json filec.update('car','tesla')# sets a new key in json filec.set('car2','ferari')instead of using functions you can also use:fromjconf.configimportConfigc=Config('main.json')# to/set or change a valuec['car']="name"c['number_plate']=['3131','3134','3132']# delete a keydelc['car']# loop over a json fileforiinc:print(i)# returns a list of tuple with (key, value)# updates / add to an existing keyc['car']+={'model','year'}# get a valuecar=c['car']Automatically creates the passed config_name if it doesn't exists