Saravanan666/pypi-org huggingface dataset:
Package: configured-mail-sender
OverviewThere are multitudinous Python packages for sending emails with widely
varying interfaces. Some concentrate on constructing the email message,
others concentrate on the delivery. But virtually all require the caller to
have explicit knowledge ofhowthe email will be delivered. Typically the
caller needs to know at least:The address and port for the SMTP server. (The fact that servers
may have different connection encryption schems is generally ignored.)The sending email address.Login name for the smtp server, if different from the sender’s address.Login credentials, typically password.All the above vary by sending email address of course. This of course
puts the onus on the email package user to maintain the above for each
potential sender. And for password (or other protocol-specific authentication
values), they need to be protected in some way, at least readable only by
the user.And, of course, they don’t support more secure authentication systems like
Google’s OAuth2.Withconfigured_email_sender, the application only needs to know the sending email address.configured_email_senderusescombine-settingsto find all it needs to deliver the mail. Public settings, e.g, SMTP
address and port can be public for the whole site. Private information
(passwords) should be readable only by the user.How It Worksconfigured_mail_sendermakes it easy for a Python script to send emails on behalf of a user
without dealing with the details of interaction with the sending email provider.
Your script only needs to know the sending email address.create_sender()uses configuration
files (system-wide or user-specific) to figure out how to communicate with the sender’s
email domain.The sending Python script creates aMailSenderobject for the sending email address.
It can then construct emails in the form ofMimeobjects and use theMailSenderobject
to send them.Here’s a simple example:import configured_mail_sender
from email.mime.text import MIMEText

sender = configured_mail_sender.create_sender('sending-email@somedomain.com')
msg = MIMEText("This is a test message", 'plain')
msg['Subject'] = 'Success!'
msg['To'] = 'receiver@gmail.com'
msg['Cc'] = ['ccer1@somewhere.org', 'ccer2@elswhere.com']
msg['Bcc'] = 'private@somedomain.com'

sender.send_message(msg)See theDOCUMENTATIONfor details on how to
configureconfigured_mail_sender.
Package: configure-fork
FORKfromhttps://github.com/andreypopp/configureORGINAL AUTHORAndrey Popp @andreypoppYAML configuration library which provides:interpolation for string configuration valuesconfiguration inheritanceconfiguration compositionobject level configuration (like construct this object by calling some
function with some arguments)Installation$pipinstallconfigure-forkChangelog0.6.1Fix imports in newer Python versions. Thx @TheAbhijeet.Added default value for environment variables resolvers (use?=after variable name).config_field_1:!envvar MY_ENV_VAR_1?=1config_field_2:ENV:MY_ENV_VAR_2?="my value"config_field_3:ENV:MY_ENV_VAR_3?="with \"escaped\" chars \\"Github Actions to check PR and publish packages.Development version publishing.Tests for bytesize and regex resolvers.Refactor of directory resolver.0.6.0Added ENVVAR resolver in order to allow to use environment variables.config_field:!envvar PYTHON_PATHAdded implicit resover for ENVVAR resolver:config_field:ENV:PYTHON_PATHModified concat resolver to allow to use environment variables:config_field:ENV:HOME "/app/" ENV:OTHER_VAR var.in.pythonChanged name in order to allow to publish on pypi0.5.1Python3 (Python2 no compatible any more).Concatenate variables on configuration:config_field:!concat var.in.python "/relative/path"Support for implicit resolvers from PyYaml.Added concat implicit resolver:config_field:var.in.python "/relative/path"0.5constructors and multi constructors now can be registered via
Configuration.add_constructor and Configuration.add_multi_constructor
decoratorsfix serious bug with factory and obj directives: previously they dropped away
nested objects such as lists and/or mappingsconfigure_logging call now can be made inside config via !logging constructorConfiguration.configure() now called inside
Configuration.{from_file,from_string,from_dict}() class methods, controlled
via configure=True keyword argument0.4.8handle kwargs in factory directive0.4.7coerce filename to abs pathdirectory — check if it exists and create if notinterpolate config before YAML parsing0.4.6bytesize0.4.5bugfix release0.4.4add PyYAML to requirements0.4.3fix factories w/o args0.4.2fix configuration of values inside sequences (lists)0.4.1fixconfigure_loggingformatters configuration0.4removeconfigure.module– it was a bad idea to synthesize new Python
modules on a fly0.3.4addedconfigure.modulemodule which allows exposing configuration as
synthesized Python module.Development takes place athttps://github.com/alfred82santa/configure
Package: configureme
configuremeSet up configuration for your application or library with ease.Featuresconfigureme gives you a few key features that make your life easy when creating libraries or applications:Easily create configuration following the config.py patternUse environment variables in your configuration and change them dynamically at runtimeUse a .env file and follow thetwelve-factor appmethodologyExampleGet up and running with full configuration quickly:fromconfiguremeimportConfigclassConfig(object):DEBUG=Falseconfig=Config()# load from a simple objectconfig.from_object(Config)# add and watch environment variablesconfig.from_envar("DEBUG")# use a dotenv fileconfig.from_dotenv("/path/to/.env/")# config works like a dict!config["DEBUG"]# TrueInstallationInstallation is easy using pip:pipinstallconfiguremeAdvanced UsageUsage with pipenvIf your using a dev workflow tool likePipenv, you can easily pair configureme with it. Pipenv will automatically load .env files for you out of the box. To track variables loaded from a .env file when using Pipenv, simply use this pattern:# .env file
DEBUG=truefromconfiguremeimportConfigconfig=Config()# watch each variable loaded by Pipenvconfig.from_envar("DEBUG")config["DEBUG"]# TrueUsage with python-dotenvpython-dotenvis a useful tool for managing .env files in multiple environments. As with the previous example, it's easy to pair with configureme.# .env file
DEBUG=truefromdotenvimportload_dotenvfromconfiguremeimportConfigload_dotenv()config=Config()# watch each variable loaded by python-dotenvconfig.from_envar("DEBUG")config["DEBUG"]# TrueHow to contributeCheck for open issues or open a fresh issue to start a discussion around a feature idea or a bug.Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).Write a test which shows that the bug was fixed or that the feature works as expected. Make sure to usepre-committoo!Send a pull request and bug the maintainer until it gets merged and published. Make sure to add yourself to AUTHORS.
Package: configuretron
Configure-TronConfiguretron enables type hinted configuration files and secrets for python.  Easily add secrets to your configuration that are encryptable from clients and decryptable from trusted developers and running services.FeaturesType-hinted configurationSimple, readable YAML configsConfig in source controlSecrets safely in source controlEasily swap environmentsControl who can encrypt and decryptInstallation$python-mpipinstallconfiguretronUsageconfig.ymlconfig:api_url:https://apitopia.com/api/v1api_timeout:20config.py@dataclassclassConfig:api_url:strapi_timeout:int=30config=configuretron.from_yaml(Config,"config.yml")Adding SecretsAdding encryption just takes a few console commands$python-mconfiguretron--yaml=config.ymlsetup_encryptionCopy the generated base64 private key into an environment variable (in this example, PRIVATE_KEY)Encrypt and variables in the config (in this example, api_token):$python-mconfiguretron--yaml=config.ymlencrypt--keyapi_tokenThen pass the key to the configprivate_key=configuretron.env_base64_value('PRIVATE_KEY')config=configuretron.from_yaml(Config,"config.yml",private_key=private_key)Environmental overridesTo override values per-environment, add them into the config like so:config:api_url:http://localhost:8080/api/v1api_timeout:20env:prod:config:api_url:https://apitopia.com/api/v1Then just passenvwhen initializing the configuration:config=configuretron.from_yaml(Config,"config.yml",env="prod")TODO FeaturesConfig heirarchyType validationMultiple layered configsHistory0.1.0 (2022-12-22)First release on PyPI.
Package: configure-with-sudo
configure_with_sudoDescriptionA Python module to handle executing system commands using sudo.UsageExtendGenericConfigure, setting at a minimum an appropriateargvcommand & argument list.ExampleThe following class will check ifpipis installed and, if not, install it system-wide usingsudo easy_install pip:fromconfigure_with_sudoimportGenericConfigureclassInstallPip(GenericConfigure):def__init__(self,kill_sudo_cred=True):# Initial argv is simply to check if 'pip' is installedargv=["/usr/local/bin/pip","-V"]super(InstallPip,self).__init__(argv,use_sudo=True,kill_sudo_cred=kill_sudo_cred)try:# Execute to check if pip is already installed# if it is, self.configured will be set to True# and subsequent calls to execute() will do nothingself.execute(use_sudo=False)exceptException:# If pip -V failed, assume pip is not installed.# Replace self.argv with the installation command.self.argv=["/usr/bin/easy_install","pip"]pip_installer=InstallPip()pip_installer.execute()The following example will capture the output ofsudo ls -l /private/var/root, and print it line-by-line:classDirectoryLister(GenericConfigure):def__init__(self,path):argv=["ls","-l",path]super().__init__(argv,use_sudo=True)path="/private/var/root"lister=DirectoryLister(path)output=lister.execute(return_output=True)forlineinoutput:print(line)
Package: configuris
ConfigurisConfiguration management made easy!What is it?A collection of parsing libraries combined into one thing for configuration purposes.FeaturesSupport for JSON, YAML and TOMLOne class for everythingEasy file managementFile being created on object initializationMethods for writing and reading fileOnly one property to use your configuration!ExamplesRead data from "settings.toml" filefromconfigurisimportConfigurissettings=Configuris("settings",filetype="toml")# create configuris objectsettings.read_file()# use this method to read our configprint(settings.data["info"])# get our data from data propertyI like Configuris!Write data to "config.yml" filefromconfigurisimportConfigurisconfig=Configuris(filetype="yml")# Configuris will use the default "config" value as file's nameconfig.data={"auto_restart":True}config.write_file()# will parse data property into yaml format and, obviously, writes it to file.Contents of the file:auto_restart:true
Package: configus
Configus - a declarative contract for configuration### Instalation```pip install configus```### Features- [x] Unified spec for process config- [x] Strict validation of config, no more trailing whitespaces or runtime panics from malphormed uri's- [x] Support parametrization from env variables and cli arguments at the same time.- [x] The same param could passed as `export DEBUG=on` or `--debug=on`- [x] Auto load of `.env` file- [x] Easy to mock for unit tests### UsageLet start with a simple spec that our requires `debug`, `version` and `secret_cookie` configuration params```python# app.pyfrom configus import config, trafaret as tif __name__ == '__main__':# Describes shape of the data params which will be taken either from env, cli args or envfile.schema = t.Dict(DEBUG=t.StrBool, VERSION=t.Float, SECRET_COOKIE=t.String)env_vars = config(schema=schema)assert env_vars == {'DEBUG': True, VERSION: 0.1, SECRET_COOKIE=<......>}```Once schema defined we can pass variables throw env```shellDEBUG=1 VERSION=1.0 SECRET_COOKIE=yo python app.py```Cmd flags```shellpython app.py --debug=1 version=1.0```Or even both```shellexport VERSION=1.0export SECRET_COOKIE=yopython app.py --debug=2```
Package: configutator
configutatorMaps yaml nodes and command line arguments to python function parameters.To install:pip install configutatorOr:git clone git@github.com:innovate-invent/configutator.git
cd configutator
python3 setup.py installTo use:Create a main function with all the parameters you need, annotated with any defaults.Use the@ConfigMapand@ArgMapdecorators to modify the default mappings if needed.In theif __name__ == "__main__":block at the bottom of the file call the loadConfig() function.Here is an example of the most basic use:from configutator import loadConfig
from sys import argv

def foo(param1, param2, param3=None):
  pass

if __name__ == "__main__":
  for argmap in loadConfig(argv, (foo,)):
    foo(**argmap[foo])One thing you need to keep in mind when working with configutator is that the config, command line arguments, and function parameters are all independant. The parameters given to @ConfigMap and @ArgMap are what connects them all. You should never have to change a function signature to modify the command line functionality.
Package: configvlm
ConfigVLMThe libraryConfigVLMis a state-of-the-art tool for Python developers seeking to rapidly and
iteratively develop vision 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 visionandover 100 language models,
with anadditional 120,000community-uploaded models in thehuggingface🤗 model collection,ConfigVLMoffers 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 sophisticatedvision-language modelswith ease.Furthermore,ConfigVLMboasts 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 ofConfigVLMincludes 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 thepublicationor thedocumentation.ConfigVLMis released under theMIT Software License
Package: configwidgets
configwidgetsSubclassingQWidgetsto save the widget state in aQSettingsInstance.
Asetupmethod links the widget to key within theQSettingsinstance.
The value is loaded during setup and gets stored when the widget state changes.
Without calling this method, the widget has no special behaviour.See the following snippet for a minimal example:from PyQt5.QtCore import QSettings
from configwidgets import ConfigCheckBox

config = QSettings()
checkBox = ConfigCheckBox()
checkBox.setup(config, "checkBox")setupinstall the package via pip:pip install configwidgetsThe full documentation can be found underconfigwidgets documentationThe source code can be found underconfigwidgets repository
Package: config-with-yaml
Config With YAMLConfig With YAML is a pure-Python package to load config YAML files.importconfig_with_yamlasconfigcfg=config.load("demo.yml")print(cfg.getProperty("Demo.Motors.Server"))print(cfg.getPropertyWithDefault("Demo.Motors.Server2","Server2"))print(cfg)Config file content:Demo:
  Motors:
    Server: ROS # Deactivate, Ice , ROS
    Proxy: Motors:default -h localhost -p 9001
    Topic: '/turtlebotROS/mobile_base/commands/velocity'
    Name: basic_component_pyCamera
    maxW: 0.7
    maxV: 4

  Camera:
    Server: ROS # Deactivate, Ice , ROS
    Proxy: "CameraL:default -h localhost -p 9001"
    Format: RGB8
    Topic: "/TurtlebotROS/cameraL/image_raw"
    Name: basic_component_pyCamera

  NodeName: demoOutput:loading Config file ./demo.yml
ROS
Server2
Demo:
  Camera:
    Format: RGB8
    Name: basic_component_pyCamera
    Proxy: CameraL:default -h localhost -p 9001
    Server: ROS
    Topic: /TurtlebotROS/cameraL/image_raw
  Motors:
    Name: basic_component_pyCamera
    Proxy: Motors:default -h localhost -p 9001
    Server: ROS
    Topic: /turtlebotROS/mobile_base/commands/velocity
    maxV: 4
    maxW: 0.7
  NodeName: demoExtra Configurationby default config_with_yaml uses the path to the file that is passed to it, but if you have all the cofiguration files in directory or several, you can set the value of the environment variable"YAML_CONFIG_PATHS"with these files separated by:, so just put the file name is able to find it.exportYAML_CONFIG_PATHS=path/to/folder1:path/to/folder2
Package: configwizard
configwizardconfigwizard is a Python package for handling configuration files. It provides aConfigclass that allows you to easily create, read, update, and delete configuration files in different formats such as JSON and TOML.ChangelogInstallationYou can install configwizard using pip:pipinstallconfigwizardUsageHere's an example of how to use configwizard:fromconfigwizardimportConfigHandler# Create a new configuration fileconfig=ConfigHandler.Config('config','json')# Add content to the configuration fileconfig.update_content({'key':'value'})# Get the contents of the configuration filecontents=config.get_content()print(contents)# Output: {'key': 'value'}# Update the contents of the configuration fileconfig.update_content({'key2':'value2'})# Get the updated contentscontents=config.get_content()print(contents)# Output: {'key': 'value', 'key2': 'value2'}# Destroy the configuration fileconfig.destroy_config()In the example above, we create a Config instance with a file name of 'config' and a file type of 'json'. We then add content to the configuration file using the add_content method and retrieve the contents using the get_content method. We update the contents with new values using the update_content method and finally destroy the configuration file with the destroy_config method.Supported File Typesconfigwizard supports the following file types for configuration files:JSON (.json)TOML (.toml)When creating a Config instance, make sure to provide the appropriate file type.LicenseThis project is licensed under the MIT License. See theLICENSEfile for more information.
Package: config-wrapper
Config wrapperSimple package that wrapsconfigparsermodule. It loads configuration file and keeps it in singleton object.Main requirements are:have type hints in IDE (like PyCharm)easy to add new sections and fieldsautomatic type casting based on on dataclass attribute typeCurrently only following field types are supported:str,bool,ini,float,list.Simple examplePreparing config manager:# define config section templates
from dataclasses import dataclass

@dataclass
class ExampleSection1:
    field_1: str
    field_2: int

@dataclass
class ExampleSection2:
    field_1: bool
    field_2: float
    field_3: list

# prepare config manager
from config_wrapper import ConfigManager

class AppConfig(ConfigManager):
    section_1: ExampleSection1
    section_2: ExampleSection2Prepareconfig.inifile:[section_1]
field_1 = value 123
field_2 = 42

[section_2]
field_1 = no
field_2 = 3.14
field_3 = item1;item2;item3Load configuration & access to values loaded fromconfig.inifile:AppConfig.load('config.ini', list_sep=';')

print(AppConfig.section_1.field_1)
# value 123

print(AppConfig.section_2.field_1)
# False

print(AppConfig.section_2.field_3)
# ['item1', 'item2', 'item3']Config section templateConfig section template is simple dataclass. It's attributes represents fields in configuration in section.To point type of field one must pass type hint to dataclass attribute (e.g.field_name: int).Section example:from dataclasses import dataclass

@dataclass
class MySection:
    field_1: str  # name of field in config file
    field_2: intAttention! Default values of attributes are ignored and overwritten by values from configuration file!Passing sections to config managerHaving config sections class one can create class that inherits fromConfigManagerclass and add class attribute of section template type.
This attribute name is associated with section name from configuration file.Simple example:from dataclasses import dataclass

from config_wrapper import ConfigManager

@dataclass
class MySection:
    field_1: str  # name of field in config file
    field_2: int


class AppConfig(ConfigManager):
    my_section_name: MySectionAbove example corresponds to following configuration structure:[my_section_name]
field_1 =
field_2 =TODOAdd unit tests for generating raw config file from ConfigManager.Generating config file from ConfigManager using default values from template sections.While generating config file if file exist and field has value it will be copied to newly generated file.Maybe support for JSON and YAML files.Maybe support for more types.
Package: configyaml
UsageThe basic usage pattern is to extend these classes to create your own.You need a loader:fromconfigyamlimportloaderfrom.config.rootimportRootclassSibbellConfigLoader(loader.ConfigLoader):config_root_class=RootThen design your config using additional classes. You need at least 1 to serve as the root class:fromconfigyaml.configimportDictNodefrom.dependenciesimportDependenciesfrom.notificationsimportNotificationsclassRoot(DictNode):"""Root of the yaml file"""def__init__(self,*args,**kwargs):self._dict_fields={'dependencies':{'class':Dependencies,'required':True,'default':[],},'notifications':{'class':Notifications,'required':True,# no point right now if no notifications'default':[],}}super(Root,self).__init__(*args,**kwargs)def_context_to_inject(self):"""Make dependencies list available to notifcations"""return{'dependencies':self.dependencies}Then to use it, simply create a loader using the configuration text content:loader=SibbellConfigLoader(yaml_text)# can now access the configuration and any other properties/method added to their classesloader.is_valid()loader.errorsloader.config_root.dependenciesHistory0.5.2 (2019-09-02)Fix KeyError when using as_dict() with a missing required dict field0.5.1 (2018-03-30)Fix ListNode passing wrong yaml node for child0.5.0 (2018-03-30)Add support for “variables”0.4.1 (2018-01-31)Give DictNode default instance access to parent and contextUpdate README badges0.4.0 (2017-06-07)Add RegexNodeDictNode fields know what their dict key was0.3.0 (2017-05-31)Add TypelessNodeAdd BoolNodeUse yaml.safe_loadAllow DictNode field to have a default value of None0.2.0 (2017-04-05)Cleanup package release tooling and documentationFix a bit of broken documentationStart some basic Sphinx documentation for classes0.1.0 (2017-03-30)First release on PyPI.
Package: config-yaml
# config-yamlSerialize and deserialize your configurations/arguments to yaml.A solution to experiment configuration recording.Compatible withargparse. Need least modifications to your original code usingargparse.Small and extensible. Add anything you need on top of the module.Seedemo.ipynbor [demo.html](https://vickyliin.github.io/config-yaml/demo/demo.html) for more examples and more details.
Package: config-yml
Config management classConfiguration management packageYaml basedCan use a config template embeded in your application distribution, and a local config (in /home/var/{application})
customized for your particular installation (that could be edited manually, or by your ansible recipe).Local config will be merged with the template in your application overwritting its values, allowing you to upgrade
and distribute your application adding new fields with default values seamlessly.When merging two lists, if the items inside are dicts it will identify them as equal if the field 'name' matches.Provides functionality not only to read the configuration, but also to modify it in runtime