Saravanan666/pypi-org huggingface dataset:
Package: envreader
EnvReaderEnvironment variables parser with types! Yes!Every time when you make new service you need some class to receive, validate and store environment variables.With this package it’ll be easy and funny.Just make a class with typed fields and... that’s it.RequirementsPython 3.7 and above. There's no additional dependencies.Installationpip install envreaderSimple usagefromenvreaderimportEnvReaderclassMyEnv(EnvReader):PATH:strLIST:listNONE_EXIST:int=1234# Variable with default valuee=MyEnv()print(e.PATH)# /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbinprint(e.LIST)# [1, 2, 3, 4]print(e.NONE_EXIST)# 1234Use with transform functionsI don’t want to make a giant validation library like wonderfulPydantic. Thus EnvReader supports only simple types(
bool, str, int, float, list, tuple and dict) by default. This is enough in most cases.Transform functions allows using EnvReader for more complex cases.fromtypingimportListfromenvreaderimportEnvReader,FieldclassMyEnv(EnvReader):PATH:List[str]=Field(transform=lambdax:x.split(":"))e=MyEnv()print(e.PATH)# ['/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin']Using static methods as a transform functions.You may store all your helper functions inside the same class. But don’t forget to add @staticmethod decorator.fromtypingimportListfromenvreaderimportEnvReader,FieldclassMyEnv(EnvReader):@staticmethoddeftrans(x:str)->List[str]:returnx.split(':')PATH:List[str]=Field(transform=trans)e=MyEnv()print(e.PATH)# ['/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin']Make your environment variables self-documented.Documentation is in great demand for all good applications, right?fromenvreaderimportEnvReader,FieldclassMyEnv(EnvReader):PATH:str=Field("/sbin",description="Application path",example="/usr/bin:/bin:/usr/sbin:/sbin")e=MyEnv()print(e.help())# PATH#     Application path#     Example: /usr/bin:/bin:/usr/sbin:/sbin#     Default: /sbinError handling? Easy.importsysfromenvreaderimportEnvReader,EnvMissingErrorclassMyEnv(EnvReader):SOME_VAR:strtry:e=MyEnv()exceptEnvMissingErrorase:print(f"Missing required env var{e.field}")sys.exit(-1)# Missing required env var SOME_VAREnjoy!
Package: env-render
Render a file with jinja2 using a context built from processing environment
variables.InstallationFrom pip:$ pip install env-renderUsageTo render a jinja document and collect all the environment variables with the
prefixAPP, enter this command:$ env-render -p APP src_template.txt output.txtExampleSo imagine this environment:APP_0_ENV0=a
APP_0_ENV1=b
APP_0_HOSTNAME=app_0
APP_1_ENV0=c
APP_1_ENV1=d
APP_1_HOSTNAME=app_1
APP_2_ENV0=e
APP_2_ENV1=f
APP_2_HOSTNAME=app_2Becomes this dictionary:{
    "apps": [
        {
            "_index": 0,
            "ENV0": "a",
            "ENV1": "b",
            "HOSTNAME": "app_0"
        },
        {
            "_index": 1,
            "ENV0": "c",
            "ENV1": "d",
            "HOSTNAME": "app_1"
        },
        {
            "_index": 2,
            "ENV0": "e",
            "ENV1": "f",
            "HOSTNAME": "app_2"
        }
    ]
}Which can then be used like this in a file. Say anhaproxy.cfgfile:listen someapp
    bind 0.0.0.0:80

    {% for app in apps %}
    server server{{ app._index }} {{ app.HOSTNAME }}:80
    {% endfor %}This is what this library is meant to do.
Package: env_replace
env-replacePipe commands that produce lots of output throughenv-replaceto replace expanded environment variables
(especially prefix paths in build output) with the environment variables themselves.Install:python3-mpipinstallenv-replaceUsage:exportPREFIX="/super-long-prefix-path"echo"cc -I$PREFIX/include -L$PREFIX/lib ..."|env-replacereverses environment variable expansion so that the output is:cc -I$PREFIX/include -L$PREFIX/lib ...instead ofcc -I/super-long-prefix-path/include -L/super-long-prefix-path/lib ...
Package: envreport
envreport: why doesn't it work anymore??Prepare reports on environments and report the differences between two environments.First and foremost, envreport produces a report on an environment in a diffable format.Inspired bypyenvdiff, which appears to have gone unmaintained.GoalsThe main goal is to help folks answer the question "It worked here, it didn't work there. WHY? WHAT'S DIFFERENT?!"Design goals:collect information about an environment, so that it can be easily compared with anotherbe compatible, easily distributable (a single Python script, require only standard library forrelativelyold Python)be modular, so additional sources of information can be added, as neededalways producesomething, even if data collection fails
Package: envreqs
Installationpip install envreqsUsageUsage:
    envreqs [options] [<path>]

Arguments:
    <path>                The path to the directory containing the application files for which a .env file
                          should be generated (defaults to the current working directory)

Options:
    --debug               Print debug information
    --ignore <dirs>...    Ignore extra/unwanted directories, each separated by a comma
    --savepath <file>     Save the .env in the given file pathExample$ envreqs /home/project/location
Successfully saved env file in /home/project/location/.envContents of .envENV_VAR_ONE=
ENV_VAR_TWO=
Package: env-resolver
ENV Resolver (Python)This is a small utility to resolveSSM ParametersandSecretsmanager Secretsand conditionally set them in the environment.This is helpful for services likeAWS BatchorAWS Lambdawhere there is not a way natively to pass secret values.Installpipinstallenv-resolverThis package assumes that you already depend onboto3and have it installed as a dependency of your project. If you are using this package inAWS Lambda,boto3will already be available.Quick StartParameter Storefromparameter_resolverimportresolve# assuming you've created two parameters:# ssm/parameter/env-one = val-one# ssm/parameter/env-two = val-twoparameters={'ENV_ONE':'ssm/parameter/env-one','ENV_TWO':'ssm/parameter/env-two'}print(resolve('ssm',parameters))# Outputs:# {#     'ENV_ONE': 'val-one',#     'ENV_TWO': 'val-two'# }Secrets Managerfromparameter_resolverimportresolve# assuming you've created the following secret:# secret/secret-one =# {#     'ENV_ONE': 'val-one',#     'ENV_TWO': 'val-two'# }secret={'secret_id':'secret/secret-one'}print(resolve('secretsmanager',secret))# Outputs:# {#     'ENV_ONE': 'val-one',#     'ENV_TWO': 'val-two'# }Usageresolve(parameter_type, parameter_value, set_environment_variables=True)These are the possible values forparameter_type:ssmsecretsmanagerOptionsTheset_environment_variablesoptions allows you to choose whether or not to set the newkey-valuepairs in the environment.SSMFor a parameter store parameter,resolveexpects theparameter_valueto be a dictionary ofKEY:PARAMETER_NAME.SecretsmanagerFor a secretsmanager secret,resolveexpects theparameter_valueto be a dictionary with the following possible values:secret={'secret_id':'string','version_id':'string',# optional'json_value':'boolean'# option, default=True}ContributingPR's are welcome!This project usesPoetryfor dependency / environment management.Install DependenciespoetryinstallTestspoetryrunpytest
Package: envrpt
ContentsOverviewUsageLicenseOverviewenvrptanalyzes the packages installed in a Python environment and produces
a report of its findings. Currently, it:Identifies and catalogs all packages installed in the environment.ChecksPyPIto determine if new versions of installed
packages are available.Checks for missing and incorrect dependencies amongst the installed packages.Checks installed packages againstSafety DBto identify those with known
vulnerabilities.UsageWhen installed into the environment you wish to analyze (pip install envrpt), theenvrptcommand should become available:$ envrpt --help
usage: envrpt [-h] [-v] [--skip-outdated-check] [--skip-vulnerability-check] [-f {console,html,json,markdown}]
              [-o FILENAME] [-s] [-p]

Analyzes the packages installed in a Python environment

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --skip-outdated-check
                        skips querying the package server for new versions of packages
  --skip-vulnerability-check
                        skips checking installed packages for known vulnerabilities
  -f {console,html,json,markdown}, --format {console,html,json,markdown}
                        the format to output the environment report in; if not specified, defaults to console
  -o FILENAME, --output FILENAME
                        the filename to write the output to; if not specified, defaults to stdout
  -s, --summary-only    only show a summary of the environment
  -p, --problems-only   only show packages with problemsLicenseenvrptis released under the terms of theMIT License.
Package: envrun-python
Run command with specified environment-variable fileInstallpip install envrun-pythonUsageRun specifying environment variables in YAML format:envrun -f env.yaml somecmd arg1 arg2Or JSON, or .env format:envrun -f .env somecmd arg1 arg2Run within a python virtualenv:envrun -e .venv pytestThat’s basically it.Note the .env format parser is taken frompython-dotenv.ContactEric Gjertsen.
Package: envrx
ENVRXENVRXis a Python class designed to manage environment variables seamlessly, providing support for various databases such as MongoDB, SQL, and Redis.
It also supports env files (let it be .json, .env or even .yaml)Table of ContentsInstallationUsageClass InitializationLoading EnvironmentDatabase OperationsExamplesLicenseInstallationpipinstallenvrxIf you are using mongodb for database:pip install pymongoor If using postgreSQLpip install psycopg2or If using Redispip install redisSqlite usessqlite3UsagefromenvrximportENVRXimportos# Initialize ENVRX with optional parametersenv_manager=ENVRX(env_file=".env",database="mongodb://localhost:27017",collection_or_table_name="env_variables")# or pass a database client clientclient=MongoClient(...)env_manager=ENVRX(env_file=".env",database=client,collection_or_table_name="env_variables")# Initialize the environmentenv_manager.initialize()# Access loaded envprint(os.getenv("env_from_db_or_file"))Class Initializationenv_file(Optional): Path to the environment file.database(Optional): Database URL for MongoDB, SQL, or Redis.collection_or_table_name(Optional): Name of the collection or table in the database.# Example initializationenv_manager=ENVRX(env_file=".env",database="mongodb://localhost:27017",collection_or_table_name="env_variables")# or if you have a database clientclient=MongoClient(...)env_manager=ENVRX(env_file=".env",database=client,collection_or_table_name="env_variables")Loading Environmentinitialize(): Initializes the class and loads environment variables from both the specified file and database.# Example loading environmentenv_manager.initialize()Please note that, all variables will be auto loaded when running this and can be accessed throughos.environ.get("foo_bar")Database Operationsload_from_database(): Loads environment variables from the specified database.get_env_from_database(key): Gets a specific environment variable from the database.get_all_env_from_database(): Gets all environment variables from the database.load_env_to_database(key, value): Loads a new environment variable to the database.delete_env_from_database(key): Deletes an environment variable from the database.update_env_in_database(key, value): Updates an environment variable in the database.# Example database operationsvalue=env_manager.get_env_from_database("KEY_NAME")env_manager.load_env_to_database("NEW_KEY","NEW_VALUE")env_manager.delete_env_from_database("OLD_KEY")env_manager.update_env_in_database("EXISTING_KEY","UPDATED_VALUE")ExamplesDatabase wise Examples can be foundhere.LicenseThis project is licensed under theGPL V3.0.
Package: envserv
EnvServBefore starting, installdotenvpip install python-dotenvEnvServ - Model view for easy Python developmentExample №1:# file: .env
FirstVar = Hello, world!
SecondVar = 42
ThirdVar = 23fromenvservimportEnvBaseclassMyEnv(EnvBase):__envfile__='.env'FirstVar:strSecondVar:intThirdVar:floatenv=MyEnv()print(env)# EnvServ(FirstVar:<class 'str'> = Hello, world!, SecondVar:<class 'int'> = 42, ThirdVar:<class 'float'> = 23.0)print(env.FirstVar,env.SecondVar,env.ThirdVar)# Hello, world! 42 23.0print(type(env.FirstVar),type(env.SecondVar),type(env.ThirdVar))# <class 'str'> <class 'int'> <class 'float'>Example №2:fromenvservimportEnvBaseclassMyEnv(EnvBase):__envfile__='.env'FirstVar:strenv=MyEnv()env.FirstVar="New variable value"# Also changes a variable in the .env fileprint(env)# EnvServ(FirstVar:<class 'str'> = New variable value)print(env.FirstVar)# New variable valueprint(type(env.FirstVar))# <class 'str'>Example №3:# file: .env
pass = 100fromenvservimportEnvBase,variableclassMyEnv(EnvBase):__envfile__='.env'pass_:int=variable(alias='pass',overwrite=False)env=MyEnv()print(env)# EnvServ(pass_:<class 'int'> = 100)print(env.pass_)# 100print(type(env.pass_))# <class 'int'>env.pass_=1# envserv.errors.EnvVariableError: Error overwriting variable pass_: It cannot be overwrittenExample №4:# file: .env
A = Text
B = 2
C = [1, 2, 3, 4, 5]
D = {1: 2, 3: 4}
E = nullfromenvservimportEnvBasefromtypesimportNoneTypeclassMyEnv(EnvBase):__envfile__='.env'A:strB:intC:listD:dictE:NoneTypeenv=MyEnv()print(env.all())print(env.all(dumps=True))# Вывод:# {'A': 'Text', 'B': 2, 'C': [1, 2, 3, 4, 5], 'D': {1: 2, 3: 4}, 'E': None}# {"A": "Text", "B": 2, "C": [1, 2, 3, 4, 5], "D": {"1": 2, "3": 4}, "E": null}Version logger:1.0.0Model addedAdded variable changeAdded class instance information output1.0.1Added rules for variable (beta)1.0.2Added setting for docker-compose (Variable __envfile__ does not need to be written)1.0.3Fix alias paramFix error message1.0.4Added support for the list, dict and None variableAdded parameter encoding to the class instanceAdded functionall()to display the dictionary
Package: env-should-be
click to read first article about this packagelatest version on pypia more efficient, automated, and developer-friendly approach, allowing them to define deployment environment requirements using simple JSON or YAML descriptions.Specify the exact conditions under which a container can run, mitigating compatibility issues and enforcing security standards seamlessly…This environment description can either be one or multiple files and can also be a combination for each type of environment…$pipinstallenv_should_be

env_should_be-fs--description/path/to/description/db.yml/path/to/description/app.json--env-file/path/to/.env--callback./notify_admin.bashexamplesa number of example should be availableunder this linkor just do aenv_should_be--help

env_should_be[-h]-dDESCRIPTION[DESCRIPTION...][-fsFAIL_SILENTLY][-eENV_FILE][-cbCALLBACK]Howshouldyourenvironmentbe?

options:-dDESCRIPTION[DESCRIPTION...],--descriptionDESCRIPTION[DESCRIPTION...]<Required>eitheroneormultiplepathsfordescriptionfiles.(json/yml)-fsFAIL_SILENTLY,--fail-silentlyFAIL_SILENTLY<Optional>willreturnanexitstatusof0evenifthedescription(s)failtomatchthecurrentenv(stilltriggersthecallback).-eENV_FILE,--env-fileENV_FILE<Optional>notspecifyingapathtoaspecificenvfiletovalidatedescription(s)against,environmentvariablesinthecurrentshellwillbeloadedinstead.-cbCALLBACK,--callbackCALLBACK<Optional>acallbackscripttobeexecutedanenvironmentfailstomatchtheadescription.(stilltriggeredonfail-silently)full list of possible descriptions:("boolean","length","min_length","max_length","regex","option","constant","is_int","is_str","is_float","is_number","is_greater_than_eq","is_lower_than_eq","is_http","is_https","is_ipv4","is_ipv6","is_email","is_uuid",)TODOs:better exceptionssupport required argsupport callbacksexample Dockerfiles for different base images (only flask for now)a more helpful readmecollect/open issuessupport older python versionssupport different/more complex descriptionssupport setting default valuesship a single executable ?
Package: envs-manager
envs-managerProject informationBuild statusTable of ContentsInstallationPyPICondaDevelopmentLicenseInstallationPyPIpip install envs-managerCondaconda install -c conda-forge envs-managerDevelopmentFork and clone the repo. To clone:git clone <link to your fork.git>cd envs-managerCreate a Python environment and activate it. For example with conda:conda env create -n envs-manager --file requirements/environment.ymlconda activate envs-managerInstall development version:pip install -e .Setup pre-commit:pre-commit installTo run the test suite:You will need to setup theENV_BACKEND_EXECUTABLEenvironmental variable in order to use aconda-likemanager. This environment variable should point to a conda or mamba executable. For example, if you have micromamba downloaded on Windows you should setENV_BACKEND_EXECUTABLE=<path to micromamba executable>/micromamba.exe. After that you should be able to run our tests with:pytest -vvTo check the command line options you need to run:envs-manager --helpLicenseenvs-manageris distributed under the terms of theMITlicense.
Package: envsmtp
envsmtpSimple sending of smtp emails using environment     variablesInstallpip install --upgrade envsmtpEnvironment VariablesYou must setSMTP_USERandSMTP_PASSin your environment with your user and password!See additional optional settings inexample.envUsageThis package will by default use STARTTLS settings forsmtp.gmail.comon port 587. If you wish to change these settings, you can set your own environment variables forSMTP_HOSTandSMTP_PORTOnce installed, here's a simple example of how to use this package:from envsmtp import EmailMessage

msg = EmailMessage(
    sender="sender@example.com",
    receipients="receipient@example.com",
    subject="envsmtp test",
    body="This is just a test message",
)
msg.smtp_send()To send with attachments:from envsmtp import EmailMessage, EmailAttachment

attachments = [
    EmailAttachment(content='/path/to/file.txt'),
    EmailAttachment(content=b'randombytes', filename='bytes_test.txt'),
    EmailAttachment(content='/path/to/another.txt', filename='this_name_is_different_.txt')
]
msg = EmailMessage(
    sender="sender@example.com",
    receipients="receipient@example.com",
    subject="envsmtp test",
    body="This is just a test message",
    attachments=attachments,
)
msg.smtp_send()RequirementsTested with & designed for python 3.10, seerequirements.txtfor additional dependenciesContributingFor bugs / feature requests please submitissuesIf you would like to contribute to this project, you are welcome
tosubmit a pull requestWarranty / Liability / Official supportThis project is being developed independently, we provide the
package "as-is" without any implied warranty or liability, usage is your own responsibilityAdditional infoJust because I like badges
Package: env-strip
Installation$[sudo]pipinstallenv-strip$[sudo]npmi-genv-stripProsDocker compatible environment file without comments, blank lines and double quotesExamples.envSECRET_KEY="https://www.youtube.com/channel/UCTZUTvv_1Onm-f-533Hyurw"# postgres settings:DB_NAME="name"# commentDB_USER="postgres"# commentDB_HOST="127.0.0.1"# commentDB_PORT=5432# comment$env-strip.envSECRET_KEY=https://www.youtube.com/channel/UCTZUTvv_1Onm-f-533HyurwDB_NAME=nameDB_USER=postgresDB_HOST=127.0.0.1DB_PORT=5432stdin$find.\(-name.env.base-o-name".env.prod.*"\)-execcat{}\;|env-strip->.env.prodreadme42.com
Package: envsubst
Substitute environment variables in a string:>>> import os
>>> from envsubst import envsubst

>>> del os.environ['PS1']
>>> print(envsubst('$USER@$HOST ${PS1:-$}:'))
ashafer01@github.com $:

>>> os.environ['PS1'] = ''
>>> print(envsubst('$USER@$HOST ${PS1:-$}:'))
ashafer01@github.com $:

>>> print(envsubst('$USER@$HOST ${PS1-foo}:'))
ashafer01@github.com :

>>> os.environ['DEFAULT_PROMPT'] = '$'
>>> print(envsubst('$USER@$HOST ${PS1:-$DEFAULT_PROMPT}:'))Also supports $0, $1, etc. from argv.
Package: env-suite
env_suiteenv_suiteis a package for generating input and submission files for vasp calculationsInstallation viapipInstallenv_suiteusingpip(if using a shared machine, add the--userargument afterinstall)pip install env_suiteUpdatingUpdate the code usingpip(if using a shared machine, add the--userargument afterinstall)pip install env_suite --upgradeInstallation withpipeditable installOnly do this if you are developing (i.e. changing) the code.Clone a copy of this repository, preferably while within a directory called gitmkdir -p git; cd git
git clone https://gitlab.com/chilton-group/env_suiteNavigate to the package directorycd env_suiteand install the package in editable mode (if using a shared machine, add the--userargument afterinstall)pip install -e .When you're done developing (i.e. your changes have been merged to the master),
or if you just want to use the current release version of the package, uninstall usingpippip uninstall env_suiteand follow the Installation viapipinstructions above.UsageTheenv_suitecommand line interface can be invoked withenv_suite -hwhich prints a list of available subprograms.Alternatively, the individual submodules can be imported into a python program or script as per usual.Building a.whlfile (Advanced)Only do this if you are told to.To build a copy of thevasp_suite.whlfile, move to thepackagedirectory.Now run./build_binaries.shThen install the.whlfile withpip(if using a shared machine, add the--userargument afterinstall)pip install dist/*.whlDocumentationThedocumentationfor this package is hosted by gitlab, and is automatically generated whenever new code is committed to themainbranch. The automatic generation of this documentation relies on a common layout for comments and docstrings within the code, seecontributingfor more information.DevelopmentBefore making changes to this repository, please follow the steps outlined in theChilton group wiki.BugsIf you believe you have a bug,please check that you are using the most up to date version of the code.If that does not fix the problem, please create an issue on GitLab detailing the following:The commands you enteredThe error messageRemember to simplify the problem as much as possible in order to provide a minimum working example, e.g. an example for a small molecule rather than one with 100000 atoms.Then, look at the code, try and figure out what you think is wrong if possible, and include this in your issue.
Package: envtk
EnvtkDescription:env toolkitCommands:Install Poetry:python3 -m pip install poetryBuild Package:python3 -m poetry buildPublish Package:python3 -m poetry publish -u  -pInstall Package Locally:python3 -m pip install envtk==1.0.4Build And Publish Package:python3 -m poetry build;python3 -m poetry publish -u  -pBuild Package; Publish Package; Install Package:python3 -m poetry build;python3 -m poetry publish -u  -p ;python3 -m pip install envtk==1.0.4Test Envtk:python3 -m pytest -rpP tests/
Package: env-to-class
DescriptionSimple use env settings with class typeinstallpip install env-to-classimportfromenv_to_classimportSettingsDescriptionThe library allows you to encrypt your settings stored in json format.
It is possible to convert from a simple storage option to an encrypted one. 
To work with the encrypted version of the settings, you need to pass the startup parameter - the password with which the encryption took place.
Try it, the library is very simple.UsageImport librequired_settings='Database.name, Database.user, Database.pwd, Database.host, Clickhouse.host, Clickhouse.user, Clickhouse.pwd'settings=Settings(required_settings)nameDB=settings.Database.nameuserDB=settings.Database.userpwdDb=settings.Database.pwdhostDB=settings.Database.hostclickhouseHost=settings.Clickhouse.hostclickhousePwd=settings.Clickhouse.pwdclickhouseUser=settings.Clickhouse.user