Saravanan666/pypi-org huggingface dataset:
Package: env-diff
Unix:Windows:Metrics:Usage:Overviewdiff-envis a command-line to tool to generate reports to compare
the value of environment variables in each of your environments against
the defaults defined in various files. It will help you you find:variables absent from production, but will be required for a new
feature in testproduction values that shouldn’t be shared to your staging
environmentvariables set that are no longer referenced in any filesThis tool was built withHeroku, but should work
with any infrastructure that supports running commands remotely.SetupRequirementsPython 3.6+InstallationInstallenv-diffwith pip:$pipinstallenv-diffor directly from the source code:$gitclonehttps://github.com/jacebrowning/env-diff.git$cdenv-diff$pythonsetup.pyinstallUsageGenerate a sample config file:$env-diff--initCustomize this file to match your project:sourcefiles: contain references to environment variables used in
your projectpath: relative path to source fileenvironments: the environments in which your project runsname: name of the environmentcommand: command to display currently set environment
variablesGenerate reports to show the differences between each environment
variable:$env-diffDemoInput YAML config file:Running in a terminal:Output (as viewed inTableTool):Revision History0.4 (2017-04-03)Added extra context around variable use in Herokuapp.jsonfiles.0.3 (2017-03-30)Added CSV report generation.0.2 (2017-03-30)Added detection of source variables matchingexport FOO=bar.Added Markdown report generation.0.1 (2017-03-30)Initial alpha release.
Package: enveloc
envelocPython package to perform envelope cross-correlation location in seismologyDependenciesobspycartopyscikit-learnutmCitationIf you use this package in your work, please cite the following paper: Wech, A.G., and K.C. Creager (2008), Automatic detection and location of Cascadia tremor, Geophys. Res. Lett., 35, L20302.InstallationUse anaconda to create a new environment, and install Python v3.11:conda create -n enveloc python=3.11Next activate that environment:source activate envelocThen install with pip:pip install envelocTest install with:from enveloc.example_utils import testtest()DocumentationGoherefor more information
Package: enveloop
enveloopVarious utilities for handling loops, recursions, etc.Limit number of recursionsLet's say you wrote a recursive function and you want to limit number of recursions, just to be infinite loop free, or for any other reason.fromenveloopimportlimit_recursion_to# let's limit the number of recursion and after# the 10th recursion run a callback function@limit_recursion_to(number_of_loops=10,callback=lambdaarg:...)defmy_func(arg):...my_func(arg)...Changelog0.1.0Added:limit_recursion_to()
Package: enveloop-py
Enveloopenveloop-py is a python wrapper for the Enveloop API. It allows easy use of the API to send messages.InstallationInstall with pip:python3-mpipinstallenveloop-pyUsageSetup the client connection:importosfromenveloop_pyimportapienveloop=api.connect(os.environ['ENVELOOP_API_TOKEN'])Send a message:enveloop.send_message(template='welcome-email',to='user@email.com',from_address='welcome@myapp.com',subject='Welcome to MyApp',template_variables={"first_name":'John',})Get information about a template (variables and body html):enveloop.template_info(template='welcome-email')ContributingBug reports and pull requests are welcome on GitHub athttps://github.com/enveloophq/enveloop-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to thecode of conduct.LicenseThe gem is available as open source under the terms of theMIT License.Code of ConductEveryone interacting in the Enveloop project's codebases, issue trackers, chat rooms and mailing lists is expected to follow thecode of conduct.
Package: envelop
A helping hand to manage your settings among different environments## IntroManaging application configuration that runs on multiple environmentscan be tough. So, **envelop** comes to help you pretend you have only onesettings file that magically works whenever you deploy.Here at Yipit, we use Chef to coordinate the deploy process and to maintain theconfiguration, using attributes or data bags.After that, we use [envdir](http://cr.yp.to/daemontools/envdir.html)to run our applications with variables set in Chef. Then, we use**envelop** to read those variables and feed the application configurationsystem.## ProductionThe system environment is the first place **envelop** will try to findthings. So, when the application runs inside of an environment with the rightvariables set, it will just work.So, if you know you have environment variables`DATABASE_URI` and `ALLOWED_IPS` like this:```bash$ export DATABASE_URI=mysql://root@localhost:3306/mydb$ export ALLOWED_IPS=10.0.0.1,10.0.0.2```The application settings glue code will look like this:```python>>> from envelop import Environment>>> env = Environment()>>> dburi = env.get_uri('DATABASE_URI')>>> dburi.hostu'localhost'>>> dburi.port3306>>> env.get_list('ALLOWED_IPS')['10.0.0.1', '10.0.0.2']```## LocalIf you just want to load things from a file locally, the`Environment.from_file()` constructor will help you out.```python>>> from envelop import Environment>>> env = Environment.from_file('/etc/app.cfg')>>> env.get_bool('BOOL_FLAG')True>>> env.get_float('FLOAT_VAL')3.14```The file `app.cfg` will look like this:```yamlBOOL_FLAG: TrueFLOAT_VAL: 3.14```## From a folderYou can also load variables from a folder, where each file will be anenvironment variable and the file's content will be the value. Just like[envdir](http://cr.yp.to/daemontools/envdir.html).Now, say that you have the folder `/etc/envdir/app` and this folder containsthe file `MYSQL_CONN_URI` with a database URL inside of it. Just like this onehere: `mysql://root:secret@localhost:3306/mydb`.To read that directory and load the variable properly, you just have to do thefollowing:```python>>> from envelop import Environment>>> env = Environment.from_folder('/etc/envdir/app')>>> uri = env.get_uri('MYSQL_CONN_URI')>>> uri.host'localhost'>>> uri.port3306>>> uri.user'root'>>> uri.password'secret'```# Hacking on it## Install dev dependencies```consolepip install -r requirements-dev.txt```## Run tests```consolemake test```## Change itMake sure you write tests for your new features and keep the test coverage in 100%## Release itAfter you already made your commits, run:```consolemake release```follow the instructions and do the [harlem shake](http://www.youtube.com/watch?v=8vJiSSAMNWw)## Project historyThis project was started by [Lincoln de Sousa](https://github.com/clarete) and was called ["Milieu"](https://github.com/clarete/milieu). We renamed it to "Envelop" on May 21st, 2014.
Package: envelope-ai
Envelope AI SDK (wayfarer)Installationpip install envelope-aiQuickstartAfter you have a API key and a collection created on your envelope accountfromwayfarer.wayfarerimportWayfarerclient=Wayfarer(api_key="<your-api-key-here>")documents={"embeddings":[1.0,0,0.8],"metadata":{label:"0"},}client.insert(documents=documents,collection_name="<your-collection-name>")# You might prefer to use collection_id here instead
Package: enver
enverEnver is a simple config / environment helper.Collect all your config values and environment variables in a single location, so new contributors knows what variables must be
set, and don't have to go searching foros.environoros.getenvscattered throughout the code.Features:Automatic validation of environment variables.Automatic casting to desired data type using Pydantic.Optional default values.Fails fast if a variable has no value (either default or override).Allows lookup using dot notation, e.g.env.DB_PASSWORD, as well as subscript (env['DB_PASSWORD']) or theget()methodenv.get('DB_PASSWORD').Installationpip install enverUsageCreate a class that inherits from Enver, with config variables as class attributes. Putting this class in a separate config.py file might be a good idea, but is not necessary.# config.pyfromenverimportEnverfromtypingimportOptional,List,DictclassConfig(Enver):MY_DB_HOST:str="127.0.0.1"MY_DB_USER:str="user"MY_DB_PASSWORD:str# No default value, will be supplied as environment value.THIS_VAL_MIGHT_NOT_EXIST_IN_ENV:Optional[str]PI:float# Read from env and converted to float, if possible.ENABLE_LOGGING:bool=TrueLOCATIONS:List[str]=["/opt","/etc"]MAPPING:Dict[str,float]If environment values with the same name as any of the attributes exist, those will be used, overriding any defaults. Values will be converted to the specified type. If conversion is not possible, an exception is thrown.Here's how to use the values:# service.pyfrom.configimportConfigenv=Config()user=env.MY_DB_USERpassword=env.MY_DB_PASSWORDifenv.exists('FEATURE_1'):feature_1()all_values=env.all()TheEnverclass and any derived classes are singletons, meaning they always return the same instance:env1=Config()env2=Config()assertenv1isenv2Which means this is fine:user=Config().MY_DB_USERpassword=Config().MY_DB_PASSWORDDevelopmentDependencies for the project are managed with poetry.
To install all dependencies run:poetryinstallTo install pre-commit and set up its git hooks:pip install pre-commit
pre-commit installNow pre-commit will run automatically on every commit.
Package: env-excavator
Tools for exconverting environment variables to native python objectsQuickstartInstall env-excavator:pip install env-excavatorExample use it in a project:>>> import os
>>> import excavator as env
>>> os.environ['FROM_EMAIL'] = 'admin@example.com'
>>> env.get('FROM_EMAIL')
'admin@example.com'
>>> os.environ['DEBUG'] = 'True'
>>> env.get('DEBUG', type=bool)
True
>>> os.environ['ALLOWED_HOSTS'] = '.example.com,.example.net'
>>> env.get('ALLOWED_HOSTS', type=list)
['.example.com', '.example.net']
Package: env-export-top
This package installs a pth file that will ensure that a $TOP environment
variable is set to the top of your development codebase before running any other
piece of python. The $TOP environment variable is set by searching the filesytem
for a.topfile, starting from the .pth file itself and travsering parent
directories.Demo:$ virtualenv tmpenv
$ . tmpenv/bin/activate
$ pip install export-top-var
$ touch .top
$ python -c 'import os; os.system("echo $TOP")'
/my/current/path
Package: env-fields
env_fieldsDataclass fields with getting values from environment by defaultInstall it from PyPIpipinstallenv_fieldsUsageimportosfromdataclassesimportfield,dataclassfromenv_fieldsimport(env_field_int,env_field_str,env_field,)@dataclassclassSomeClass:attribute_1:int=field()attribute_2:int=env_field_int('SOME_INT_ENVIRONMENT_VARIABLE')attribute_3:str=env_field_str('SOME_STR_ENVIRONMENT_VARIABLE')attribute_4:str=env_field_str('SOME_STR_ENVIRONMENT_VARIABLE_THAT_NOT_SET',default="hello, world")attribute_5:int=env_field("SOME_CUSTOM_TYPE_ENV_VARIABLE",float,init=False)Let's create some dataclass!>>>os.environ['SOME_INT_ENVIRONMENT_VARIABLE']="1234">>>os.environ['SOME_STR_ENVIRONMENT_VARIABLE']="hello, world 1">>>os.environ['SOME_CUSTOM_TYPE_ENV_VARIABLE']="2.59">>>SomeClass(12)SomeClass(attribute_1=12,attribute_2=1234,attribute_3='hello, world 1',attribute_4='hello, world',attribute_5=2.59,)DevelopmentRead theCONTRIBUTING.mdfile.
Package: envfileparser
envfileparserThis package is as simple as possible to get variables from .env files or files with a similar structure.DescriptionThe package
has no dependencies and works with files
located in the same directory as the file from
which the functions of this package were called.Functionget_env()takes the name of the target variable
as a string and an optional second parameter -
the path to the file. After that, the function returns the
value of the variable also as a string.Functionget_envs()accepts a sequence of variable
names as a string, and also an optional
parameter-the path to the file.
This function returns a list of strings
that are the values of the desired variables.Functionget_env_from_file()combines the functionality of
get_env and get_envs and also  if the parameter
with variable names is left empty, the function
returns a dictionary with all the variables from the file.By default,.envis specified
as the path. Empty lines and lines without
the'='character are skipped.
In addition, commenting with a prefix of the'#'character is supported.In the event that
the specified variable is
missing or the desired file cannot be found,
the corresponding exceptions are thrown.Getting startedInstallenvfileparserfromPyPiwith pip:pip install envfileparserUsage example:The .env file:CONST1 = 1
CONST2 = -2

VAR1 = "var1"
VAR2 = 'var2'
VAR3 = var3Python code:fromenvfileparserimportget_env,get_envs,get_env_from_fileCONST_ONE=get_env('CONST1')# CONST_ONE = '1'CONST_TWO=get_env('CONST2',file_path='.env')# CONST_TWO = '-2'all_variables=get_env_from_file()# all_variables = {'CONST1: '1', 'CONST2': '-2', 'VAR1':= 'var1', 'VAR2': 'var2', 'VAR3': 'var3'}c1=all_variables['CONST1']# c1 = '1'c2=all_variables['CONST2']# c2 = '-2'variables=get_envs('VAR1','VAR2','VAR3')# variables = ['var1', 'var2', 'var3']v1,v2,v3=variables[0],variables[1],variables[2]One more .env file example (support for comments):# Service token.
API_TOKEN = f3u12yf36f12f418449go3294g238

PORT = 3417
IP = 127.0.0.1 # loopback

USER = 'ADMIN'
PASSWORD="12345678"If your value contains the "#" character,
then be sure to put it in quotation marks - otherwise
the parser will take all subsequent characters (including the" # " character) as a comment:VAR1=envfile#parserVAR2="envfile#parser"Python code:fromenvfileparserimportget_envsprint(*get_envs('VAR1','VAR2'),sep='\n')Output:envfile
envfile#parserNew version0.0.8:Added new functionget_env_from_file().Combines the functionality ofget_env()andget_envs().If the parameter with variable names is left empty, the function returns a dictionary with all the variables from the file.get_env_from_file()return empty dictionary if file is empty.Fixed problems with comments issue #6.Removing right and left side spaces in values (all values are string).How to contact the maintainer:
Package: envfiles
envfiles: Simple layered loading of env filesSo you've set up your app to configure itself from environment variables,
awesome, well done!Now all you need to do is to make sureall of themare present before
running your app. Good thing we have env files, right? But wait, they can't
be the same all the time, they're slightly different for tests, Docker,
and for local development... that's annoying.No biggie though, we can just create several env files and load them...
But that would fail in prod because the env files won't be there...
We could load them only if they exist but that's kinda hacky...Wouldn't it be neat if we could layer env files? Imagine abase.env:CACHE_ENABLED=1
DATABASE_HOST=localhost
DATABASE_NAME=myappAtest.envthat overrides it:# >> base.env
CACHE_ENABLED=0
DATABASE_NAME=myapp_testNote the first line# >> base.env, the# >>is an arbitrary prefix, thebase.envis a pathrelative to the file being read.Then point envfiles to the file you want to load and let it resolve the variables.
For example, you could defineoneenvironment variable,ENV_FILEfor instance,
containing a relative path to the env file you want to load:importenvfilesenv_vars=envfiles.load_env_files(os.getenv("ENV_FILE"))assertenv_vars=={"CACHE_ENABLED":"0","DATABASE_HOST":"localhost","DATABASE_NAME":"myapp_test",}Noteenvfileswillnotmess with youros.environ, or attempt parsing or
(de)serializing variables. The output is a dictionary of strings to strings,
what you do with it is entirely your business. Typically you would combine it
withos.environand pass it to your app's configuration solution.For example, if you're usingenviron-config💚importenvironimportenvfilesfromsettingsimportMyConfig# your environ-config Config classenv_vars=envfiles.load(os.getenv("ENV_FILE"))env_vars.update(os.environ)# actual environment variables have preferenceconfig=environ.to_config(MyConfig,environ=env_vars)Why?Frustration, mostly. I've had this issue more times than I can count. I've tried
different libraries but none of them supported layering or sort of did but
messed with theos.environin surprising ways.The idea behindenvfilesis to declaratively define how the env files are loaded
and let you use whatever configuration solution you want.Configuration is the first thing your app does, it should be as quick and
straightforward as possible.AlternativesIfenvfilesis not what you were looking for here are some other options you
may want to consider, all of them more mature and featured thanenvfiles:dotenvenvirons
Package: env-flag
env-flagGet boolean values from environment variables in Python.fromenv_flagimportenv_flag# When unset, default to `False`.debug=notenv_flag('PRODUCTION')# When unset, use explicit default.is_local=get_bool('IS_LOCAL',default=True)Values are coerced as follows:When the variable is unset, or set to the empty string, returndefault.When the variable is set to a truthy value, returnTrue.
These are the truthy values:1true, yes, onWhen the variable is set to the anything else, returnFalse.
Example falsy values:0noIgnore case and leading/trailing whitespace.Provides MyPy-compatible type annotations.Development./dev.pyinit
./dev.pytest./dev.pylint
./dev.pyblackContributeIssue Tracker:https://github.com/metabolize/env-flag/issuesSource Code:https://github.com/metabolize/env-flagPull requests welcome!SupportIf you are having issues, please let us know.AcknowledgementsThis function was inspired bynode-env-flag, the equivalent for Node.js.
It was developed at Body Labs byPaul Melnikowand later open sourced.
It was forked in 2019 by Paul Melnikow. Thanks to a repository and package
transfer from Body Labs, the fork has been merged back into the original.LicenseThe project is licensed under the two-clause BSD license.
Package: envfrom
envfromKubernetesSecretsorConfigMapare commonly used to run apps deployed in pods.But what about running this app locally with those same variables ? envfrom meet this need among others likeenvdiror.env.Installationpip install envfromUsageusage: envfrom [-h] {cli,dir,dotenv,kube,vault} ... childCall child process with custom environment

positional arguments:
  {cli,dir,kube,vault}  env source
    cli                 Dict values: FOO=BAR BAR=FOO
    dir                 Set environment according to files in a specified path
        dotenv              Set environment according to .env file
    kube                Mirror specified kubernetes ressource volume keys (decoded)
    vault               Fetch secrets from Vault paths
  child                 child process

optional arguments:
    -h, --help            show this help message and exitKubernetes secrets exampleAssuming that you already have the following secret created on your default namespace :apiVersion: v1
kind: Secret
metadata:
  name: mysecret
type: Opaque
data:
  username: YWRtaW4=Running :env -i envfrom kube secrets mysecret envShould output :username=admin
Package: envguardian
EnvGuardianA lightweight python environment variables validatorEnvGuardian is a lightweight Python library designed to ensure the presence of all required environment variables when
your project is executed, thereby minimizing the occurrence of runtime errors. This functionality proves particularly
valuable in scenarios where environment variables are specified in a .env or .env.example file, ensuring that all team
members possess up-to-date versions of the mandatory variables in .env files.By leveraging EnvGuardian, your development team can rest assured that the necessary environment variables are
appropriately set before the project is run, safeguarding against common errors resulting from missing or incorrectly
configured environment variables. This proactive approach not only enhances the stability and reliability of your
applications but also promotes seamless collaboration among team members by streamlining the management of environment
configurations.Installationpip install envguardianUsageIn your project root create anEnv.pyfile and define a variable calledenv_schemalike so# Env.pyfromenvguardianimportEnvenv_schema={'DB_NAME':Env.string(),'ENVIRONMENT':Env.enum(['development','stage']),'PORT':Env.integer(),'DEBUG':Env.boolean(),'SOME_VAR':Env.float()}Somewhere else in your project, ideally, the entry point of your project, validate like sofromenvguardianimportEnvEnv.validate()If the validation fails, expect something like this,.validate()will throw aValueErrorException.Exception:{'DB_NAME':'`None` is not a string','ENVIRONMENT':"`None` is not one of: ['development', 'stage']",'PORT':'`None` is not an integer','SOME_VAR':'`None` is not a float'}You can also use EnvGuardian to get environment variables with their correct type, provided you have defined them
inenv_schemaand the variable is present in environment variables.fromenvguardianimportEnvprint(type(Env.get('DEBUG')))Output :<class 'bool'>
Package: envi2numpy
envi2numpy - Converting ENVI shots to numpyPython module for converting hyperspectral ENVI captures to numpy arrays.
It can also do white/dark balancing.To install:python3./setup.pybuild
python3./setup.pyinstallThis module can also be installed using pippip3installenvi2numpyExampleSuppose the following files:DARKREF_EXAMPLE_2020-01-01-10-10-10.hdrDARKREF_EXAMPLE_2020-01-01-10-10-10.logDARKREF_EXAMPLE_2020-01-01-10-10-10.rawEXAMPLE_2020-01-01-10-10-10.hdrEXAMPLE_2020-01-01-10-10-10.logEXAMPLE_2020-01-01-10-10-10.rawWHITEREF_EXAMPLE_2020-01-01-10-10-10.hdrWHITEREF_EXAMPLE_2020-01-01-10-10-10.logWHITEREF_EXAMPLE_2020-01-01-10-10-10.rawimportenvi2numpy# Settingsdo_normalize=False# Normalize pixel values between 0.0 and 1.0do_log_derive=False# Take the logarithmic derivative between the bands# Parse meta infohdr_dict=envi2numpy.readHDRfile(cube_hdr_path="EXAMPLE_2020-01-01-10-10-10.hdr")width=hdr_dict['width']num_bands=hdr_dict['bands']numpy_array=envi2numpy.convert(cube_path="EXAMPLE_2020-01-01-10-10-10.raw",dark_ref_path="DARKREF_EXAMPLE_2020-01-01-10-10-10.raw",white_ref_path="WHITEREF_EXAMPLE_2020-01-01-10-10-10.raw",width=width,num_bands=num_bands,normalize=do_normalize,log_derive=do_log_derive
Package: envia
EnviaDid you ever lose track of all environment variables you can use to configure a project? Envia is a simple utility that allows you to group them together.Installationpip install enviaUsageYou can use Envia as follows# app/config.pyfromenviaimportEnvVarAPP_DB_VENDOR=EnvVar("APP_DB_VENDOR",default="postgres")APP_DB_PORT=EnvVar("APP_DB_PORT",default="5432")APP_DB_HOST=EnvVar("APP_DB_HOST")# require() can be used to ensure early failure.# This fails if APP_REQUIRED_VAR is not setAPP_REQUIRED_VAR=EnvVar("APP_REQUIRED_VAR").require()To use the environment values you can do# app/db.pyimportapp.configascfgdefconnect():vendor=cfg.APP_DB_VENDOR.get_required()port=cfg.APP_DB_PORT.get_required()# This fails APP_DB_HOST is not sethost=cfg.APP_DB_HOST.get_required()# This returns None if APP_DB_HOST is not sethost=cfg.APP_DB_HOST.require()
Package: envialia
Python API Envialia carrier.FeaturesServicesTest connectionList all shipments (by date)Create/Send shipments to EnvialiaGet shipment info (details)Get shipment stateDelete shipmentUsage ExamplesExample API in test.py fileServicesfromenvialia.utilsimportservicesservices()Test connectionwithAPI(agency,customer,password,debug)asenvialia_api:envialia_api.test_connection()List all shipments by datewithPicking(agency,customer,password,debug)aspicking_api:date=None# date YYYY/MM/DDprintpicking_api.list(date)Create/Send shipments to EnvialiawithPicking(agency,customer,password,debug)aspicking_api:data={...}reference=picking_api.create(data)Get shipment info (details)withPicking(agency,customer,password,debug)aspicking_api:reference='123456'data={}data['agency_origin']=agencydata['agency_cargo']=agencypicking_api.info(reference,data)Get shipment statewithPicking(agency,customer,password,debug)aspicking_api:reference='123456'data={}data['agency_origin']=agencydata['agency_cargo']=agencypicking_api.state(reference,data)Delete shipmentwithPicking(agency,customer,password,debug)aspicking_api:reference='123456'data={}data['agency_origin']=agencydata['agency_cargo']=agencypicking_api.delete(reference,data)