Saravanan666/pypi-org huggingface dataset:
Package: envialosimple-transaccional
EnvíaloSimple Transaccional - Python SDKRequirementsPython 3.8 or higherEnvíaloSimple Transaccional API Key (Create a demo account for free here)Installationpipinstallenvialosimple-transaccionalBasic Usagefromenvialosimple.transaccionalimportTransaccionalfromenvialosimple.transaccional.mailimportMailParamsestr=Transaccional(your_api_key)params=MailParams(from_email='no-reply@mycompany.com',from_name='MyCompany Notifications',to_email='john.doe@example.com',to_name='John Doe',subject='This is a test for {{name}}',html='<h1>HTML emails are cool, {{name}}</h1>',text='Text emails are also cool, {{name}}',substitutions={'name':'John'})estr.mail.send(params)
Package: envidat-utils
EnviDat Python UtilsUtilities for EnviDat projects in Python.Documentation:https://envidat.gitlab-pages.wsl.ch/envidat-python-utils/Source Code:https://gitlabext.wsl.ch/EnviDat/envidat-python-utilsPyPi PackageThis package aims to speed up EnviDat python workflowsContains:Backend API function wrappers.S3 bucket class, with configurable endpoint.Utils to use in multiple projects (e.g. consistent logger setup).Install$pipinstall-Upip
$pipinstallenvidat-utilsUsagefromenvidat.utilsimportget_loggerfromenvidat.s3importBucketfromenvidat.api.v1importget_package_listConfigEnvironment variables:LOG_LEVEL: Logging level, default INFODOTENV_PATH: Path to dotenv file if in debug mode, default=.env.API_URL: URL root for the API to call, default=https://www.envidat.chTEMP_DIR: Temporary path for S3 downloads, default=/tmpAWS_ENDPOINT: For S3.AWS_REGION: For S3.AWS_ACCESS_KEY: For S3.AWS_SECRET_KEY: For S3.
Package: envier
EnvierPython application configuration from the environmentSynopsisEnvier is a Python library for extracting configuration from environment
variables in a declarative and (eventually) 12-factor-app-compliant way.UsageThe following example shows how to declare the configuration for an application
that uses theMYAPP_DEBUG,MYAPP_SERVICE_HOSTandMYAPP_SERVICE_PORTvariables from the environment.>>>fromenvierimportEnv>>>>>>classGlobalConfig(Env):>>>__prefix__="myapp">>>>>>debug_mode=Env.var(bool,"debug",default=False)>>>>>>service_host=Env.var(str,"service.host",default="localhost")>>>service_port=Env.var(int,"service.port",default=3000)>>>>>>_is_default_port=Env.der(bool,lambdac:c.service_port==c.spec.service_port.default)>>>>>>config=GlobalConfig()>>>config.service_port3000>>>config._is_default_portTrueConfigurations can also be nested to create namespaces:>>>fromenvierimportEnv>>>>>>classServiceConfig(Env):>>>__prefix__="service">>>>>>host=Env.var(str,"host",default="localhost")>>>port=Env.var(int,"port",default=3000)>>>>>>classGlobalConfig(Env):>>>__prefix__="myapp">>>>>>debug_mode=Env.var(bool,"debug",default=False)>>>>>>service=ServiceConfig>>>>>>config=GlobalConfig()>>>config.service.port3000The same configuration can be obtained with implicit nesting by declaring theServiceConfigsubclass insideGlobalConfig, and setting the class attribute__item__to the name of the item the sub-configuration should be assigned to,
viz.>>>fromenvierimportEnv>>>>>>classGlobalConfig(Env):>>>__prefix__="myapp">>>>>>debug_mode=Env.var(bool,"debug",default=False)>>>>>>classServiceConfig(Env):>>>__item__=__prefix__="service">>>>>>host=Env.var(str,"host",default="localhost")>>>port=Env.var(int,"port",default=3000)>>>>>>config=GlobalConfig()>>>config.service.port3000Type CheckingThe library ships with amypyplugin to allow for type checking. If you want
to use it, either install the library with themypyextra or ensure thatmypyis installed, and then addenvier.mypyto the list of extra plugins in
themypyconfiguration.RoadmapAdd support for environment files.Rely on type hints as support for older versions of Python is dropped.Derivations might require an evaluation order.
Package: enview
enviewEnview (environment viewer) is a simple, fast, and powerful environment viewer (and editor).OS SurpportIt now supports Linux and Windows.DependenciesPython (>=3.8)Installationpipinstall.Usageenviewgetall: Display all the environment variables.edit: Display all the environment variables in a neat way. You can select any variable you like to edit.Move up with keys 'w' or 'k'. Move down with keys 's' or 'j'.Go to the top and bottom with keys 'g' and 'G', respectively.Go to the environment variable according to its position in the list by ":[number]".Search for variables with "/". For next or prior result, press 'n' or 'N' respectively.Edit with 'e'.Edit in intelligent mode with 'i'.conflict: Check if there is any conflict between the environment variables and the current environment variables. Argument ['varname'] is required.optimize: Remove the duplicates in path group.setenv: Set the value of a specified environment variable. Arguments ['value', 'name'] are required.clip: Clip all the environment variables to the clipboard.save: Save all the environment variables in the format "export name=value" to the current directory. The default file name is "env.txt"(Press enter when prompted).Exit the program with 'quit', 'q' or 'exit'.For more information, use 'help' command.
Package: envil
Typed environment variablesThis module implements the mundane task of getting typed values from
environment variables.Copyright ® 2020, Luís Gomesluismsgomes@gmail.com. All rights reserved.Links:https://github.com/luismsgomes/envil|https://pypi.org/project/envil/UsageAssuming your environment has two variables set as follows (bash syntax):export FOO=123
export BAR=yThen, you may access them in Python code as follows:import envil as env

foo = env.get_int("FOO", 0)
bar = env.get_bool("BAR", False)The set of strings considered to be falsy values for boolean variables are
specified inenvil.FALSY_VALUES:>>> print(repr(envil.FALSY_VALUES))
{"0", "false", "f", "no", "n"}If needed you may override this list with your own, as in this example:bar = env.get_bool("BAR", falsy_strings={"nope", "zilch", "zero", "nada"})The second argument is the default value to be returned if the variable is not defined.
If not specified, this argument will default toenvil.RAISE_EXCEPTION, which will
cause anEnvironmentVariableNotSetexception to be raised if the variable is not defined.Note that, unlike in Python'sgetenv(), you may specifyNoneas a valid default value.LicenseThis library is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3 as published
by the Free Software Foundation.This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License version 3 for more details.You should have received a copy of the GNU General Public License along
with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Package: envinfopy
envinfopySummaryInstallationUsageLibrary usageCLI usageDependenciesSummaryenvinfopy is a Python Library to get execution environment information.Installationpython3 -m pip install envinfopyUsageLibrary usageGet execution environment information as a dictionary:>>>importenvinfopy>>>envinfopy.get_envinfo(){'uname':'Linux','python_implementation':'CPython','python_version':'3.11.4','platform':'Ubuntu 22.04.2 LTS'}Get execution environment information and specific package version information:>>>importenvinfopy>>>envinfopy.get_envinfo(["envinfopy"]){'uname':'Linux','python_implementation':'CPython','python_version':'3.11.4','platform':'Ubuntu 22.04.2 LTS','envinfopy':'0.1.0'}Get environment information as Markdown:python3 -m pip install envinfopy[markdown]  # install optional dependencies>>>importenvinfopy>>>print(envinfopy.dumps(["envinfopy"],format="markdown"))|Module|Version||---------|------------------||uname|Linux||Python|CPython3.11.4||platform|Ubuntu22.04.2LTS||envinfopy|0.1.0|CLI usage$ python3 -m install envinfopy[cli]  # install optional dependencies

$ python3 -m envinfopy envinfopy setuptools --format markdown
|   Module   |                 Version                 |
| ---------- | --------------------------------------- |
| uname      | Linux 5.15.90.1-microsoft-standard-WSL2 |
| Python     | CPython 3.11.4                          |
| platform   | Ubuntu 22.04.2 LTS                      |
| envinfopy  | 0.0.7                                   |
| setuptools | 67.8.0                                  |Command helpusage: __main__.py [-h] [-V] [-v] [--format {text,markdown,md,json,itemize}] packages [packages ...]

positional arguments:
  packages              PyPI package names to extract versions

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -v, --verbose
  --format {text,markdown,md,json,itemize}
                        output format

Issue tracker: https://github.com/thombashi/envinfopy/issuesDependenciesPython 3.7+
Package: envious
If you spend a lot of time switching between multiple Python projects and using
several virtual environment, you’ll be familiar with the pain of injecting the
right environment variables into your scripts. You can use autoenv, but it
doesn’t automatically load the virtual environment for you, so you need to
litter the .env file with bash commands. Or you can use a postactivate hook in
virtualenvwrapper, but that would mean not having a standardized,
default location for all the needed environment variables. And what if you use
an IDE like PyCharm, which doesn’t load variables from .env files?Envious solves the problem by loading configurations from an .env file in the
working directory directly from within your Python code, injecting environment
variables if they’re not already defined, while keeping those that are already
set.InstallationTo install envious, simply type:$pipinstallenviousUsageTo have your project import environment variables from an .env file, first
create the file in the root folder of your project:ENVIRONMENT=developmentMONGODB_URL=http://localhost:27017/mydbREDIS_URL=http://localhost:6379/0Then add the following to the Python app entry point:from envious import load_env

load_env()If you want to manage multiple configuration files for the same project, you’re
covered. Create multiple configuration files, and then specify the one you want
to use by providing an environment variable namedENV_FILE:$echoMONGODB_URL=http://localhost:27017/myseconddb>.env2$ENV_FILE=.env2pythonmy_script.pyThe script will see the alternative value for the environment valueMONGODB_URL.
Package: envipath-api
envipath-apiInstallationpip install envipath-apiExampleGet all SMIRKS of a particular Biodegradation RulefromenvirestimportEnviPathClientclient=EnviPathClient('envipath.org')# find package by nameEAWAGBBD=client.findpackage('EAWAG-BBD')# find rule by namebbd_rules=client.get(f'{EAWAGBBD}/rule')['rule']BT37=[rule['id']forruleinbbd_rulesifrule['name']=='bt0037'][0]# collect SMIRKS from simple rulessimple_rules=client.get(BT37)['simpleRules']smirks=[client.get(rule['id'])['smirks']forruleinsimple_rules]
Package: enviPath-python
enviPath PythonPython client forenviPath- the environmental contaminant biotransformation pathway resource.Quickstartpipinstall--upgradeenviPath-pythonfrompprintimportpprintfromenviPath_pythonimportenviPatheP=enviPath('https://envipath.org')bbd=eP.get_package('https://envipath.org/package/32de3cf4-e3e6-4168-956e-32fa5ddb0ce1')bbd_pws=bbd.get_pathways()pprint(bbd_pws[0].get_description())DocumentationThe enviPath-python documentation can be foundhere.If you are new to enviPathour wikimight also contain some value
information.ExamplesSearching datafromenviPath_pythonimportenviPatheP=enviPath('https://envipath.org')# get package(s) that should be searchedbbd=eP.get_package('https://envipath.org/package/32de3cf4-e3e6-4168-956e-32fa5ddb0ce1')soil=eP.get_package('https://envipath.org/package/5882df9c-dae1-4d80-a40e-db4724271456')# returns a dictionary with properly initialized objectsres=eP.search('c1ccccc1',[bbd,soil])print(res)# or use a package to search itres=bbd.search('c1ccccc1')print(res)Accessing DatafrompprintimportpprintfromenviPath_pythonimportenviPatheP=enviPath('https://envipath.org')# get the EAWAG BBD packagebbd=eP.get_package('https://envipath.org/package/32de3cf4-e3e6-4168-956e-32fa5ddb0ce1')# access collections (e.g. compounds)# other collections such as reactions, rules, pathways, etc work the same waycompounds=bbd.get_compounds()forcincompounds[:10]:print(c.get_id(),c.get_name(),c.get_smiles())Accessing private dataimportgetpassfromenviPath_pythonimportenviPatheP=enviPath('https://envipath.org')# get username + passwordusername=input("Enter username")password=getpass.getpass(prompt="Password for{}".format(username))eP.login(username,password)print(eP.who_am_i())forpineP.get_packages()[:10]:print(p)Predict PathwaysfromenviPath_pythonimportenviPathfromenviPath_python.objectsimportPathwayfromtimeimportsleepeP=enviPath('https://envipath.org')# obtain the currently logged in userme=eP.who_am_i()# get the package the pathway should be stored inpackage=me.get_default_package()# will trigger the pathway predictionpw=Pathway.create(package,smiles='CC1(C)C2CCC1(C)C(=O)C2')# wait until the prediction finishedwhilepw.is_running():print("Sleeping for three secs...")sleep(3)# check resultifpw.has_failed():exit(1)else:fornodeinpw.get_nodes():print(node.get_smiles())
Package: enviro
Simple Python module and IPython extension for setting OS environment variables from config files.In web app and software-as-a-service development, it is widely considered best programming practice to separate application code from its configuration. Temporary or sensitive values such as authorization credentials, database handles, and keys to other services should reside in a separate file, never as part of the code repository. The application code should read these values from OS environment variables, which are set by the execution environment. Tools like foreman and honcho read environment files - lines containing key=value settings - and update the OS environment prior to running the server, workers, etc.This practice should be extended to analysis and interactive environments. Not only is it a good idea to separate config values from the code, but analysis tools often need to be configured from the same source as a deployment, for debugging or other analysis.enviro(pronounced en-vye-ro) is a simple Python module and IPython extension that can set OS environment variablesos.environfrom environment files.UsageSimply importenviroand callconf(). By default it reads.env:importenviroenviro.conf()# Load contents of .env into os.environA different file may be specified:enviro.conf('production.env')IPython Extensionenviroalso provides an IPython extension so that it is always easily available as a line magic function without the need to import:$ ipython
In [1]: %enviroAs above, it reads.envin the current directory by default, but an alternate file can be specified on the line:In [1]: %enviro production.envExample.envin the current directory has the following contents:SERVICE_API_KEY = abc123
SERVICE_API_SECRET = def456
DATABASE_URI = postgres://user:password@host/dbname>>>importenviro>>>importos>>>enviro.conf()>>>os.environ['SERVICE_API_KEY']'abc123'>>>os.environ['SERVICE_API_SECRET']'def456'>>>os.environ['DATABASE_URI']'postgres://user:password@host/dbname'InstallationThe easiest way to install is to usepip.pip install enviroTo load the IPython extension every time IPython starts, add‘enviro_ipy_ext’to the extensions in your IPython config file (usually~/.ipython/profile_default/ipython_config.py):c.InteractiveShellApp.extensions=['enviro_ipy_ext',]andc.TerminalIPythonApp.extensions=['enviro_ipy_ext',]To load the IPython extension without modifying youripython_config.pyyou can run%load_ext enviro_ipy_extto expose the%enviromagic function, although that’s just as easy as importing it directly so best to add it to your config and avoid this step.See alsoThe Twelve-Factor App(particularly the Config section)Using IPython extensionsheroku-config pluginautoenv
Package: enviRobot-scoop
eco_ask.env檔請填入以下資訊, 並放置於你終端機的工作目錄LINE_CHANNEL_TOKEN=
LINE_CHANNEL_SECRET=
OPENAI_KEY=
GOOGLE_API_KEY=Geocoding API key
IMGUR_ID=
#DEVICE_MAP_CSV_PATH=有device_id,lat,lon對應的csv位置 如果需要使用get_rawdata mode=10min的話使用pip安裝pip install enviRobot-scoop使用scoop-handlerfrom enviRobot_scoop import enviRobot_scoop
enviRobot_scoop.handle_enviRobot(dic_params, question, websocket)requirements 裡面要根據不同作業系統設定 kaleido 套件的版號
kaleido==0.2.1 <-- linux
kaleido==0.1.0post1 <-- windows
Package: envirocar-py
envirocar-pyThe enviroCar Python package allows users to query and download trajectory data from the enviroCar API. The data will be stored in a flat GeoDataFrame from GeoPandas. The resulting dataframe consists of all measurements from the requested tracks including measured sensor values from the cars and further metadata about the track.The package currently only supports querying track data. It is intended to further expand these functionalities with additional analytics in the future.InstallationThe package requires a Python version >= 3.6. The package is available on the PyPI package manager and can be installed with the following command:pip install envirocar-py --upgradeTo install envirocar-py in develop mode, use the following:python setup.py developExamplesJupyter notebooks on how to use this package to request data from enviroCar API can be found in the examples folder:Download data and visualize with pydeck (here)LicenseMIT License

Copyright (c) 2020 The enviroCar Project

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: envirodataqc
EnviroDataQCThis library provides a framework for assessing quality of environmental data.Data is assessed with respect to:Data RangeData rate of changeData flatliningAdditionally, special methods are provided for assessing wind speed and direction data.
Data is classified as either suspicious or bad based on either default or custom user settings.Installationpip install envirodataqcThe configuration file is currently a python script in the package, so it may be
easier to clone the repository rather than install from PYPI if you want to change
the configuration.Basic UsePass data (Pandas series) and measurement type to check_vals(). A Pandas dataframe is returned with three new columns: 'flags_range', 'flags_rate', 'flags_flat'. Measurement types supported are defined in 'QCconfig.py'.Flags:0 : Good1 : Suspicious2 : BadConfigurationChange and/or add dictionaries defined in 'QCconfig.py'. Dictionary entries define "good" ranges and "suspicious" ranges for each flag category. Configuration ranges can be non-continuous and any overlap between "good" and "suspicious" ranges will be flagged as "good".Wind specific checkscheck_windsp_ratio - Check ratio of mean windspeed to maxcheck_windsp_withdir - Check if windspeed is consistent with directioncheck_winddir_withsp - Check if direction is consistent with windspeedOther Functionscheck_gaps(index) - Given a Pandas datetime index outputs total time where gaps between timestamps are > 1hr.daily_quality(data) - Given a Pandas series (index=timestamp, values=data flags), return a pandas series with a consolidated daily quality level (0,1,2)
Package: envirohat
EnvirohatEnviro+ sensors in one placeInstallationBefore installing the package, thepyaudiopackage needs to be installed withapt:sudo apt install python3-pyaudioThen the Envirohat package can be installed usingpip:pip intall envirohatReferenceget_temperature()- get current temperatureget_humidity()- get current humidityget_pressure()- get current pressureget_altitude(qnh=1013.25)- get altitudeget_lux(passive=False)- get ambient light in luxget_proximity(passive=False)- get raw proximity value, closer object produce larger valuegas_read_all()- get gas resistance for oxidising, reducing and NH3gas_read_oxidising()- get gas resistance for oxidising (callsread_all)gas_read_reducing()- get gas resistance for reducing (callsread_all)gas_read_nh3()- get gas resistance for NH3 (callsread_all)get_amplitudes_at_frequency_ranges(ranges)- get the mean amplitude of frequencies in the given rangesranges: List of ranges including a start and end rangeget_amplitude_at_frequency_range(start, stop)- get the mean amplitude of frequencies in the specified rangestart: Start frequency (in Hz)end: End frequency (in Hz)get_noise_profile(noise_floor=100, low=0.12, mid=0.36, high=None)- get a noise characteristic profilenoise_floor: "High-pass" frequency, exclude frequencies below this valuelow: Percentage of frequency ranges to count in the low bin (as a float, 0.5 = 50%)mid: Percentage of frequency ranges to count in the mid bin (as a float, 0.5 = 50%)high: Optional percentage for high bin, effectively creates a "Low-pass" if total percentage is less than 100%bme- the BME280 sensorltr- the LTR559 sensornoise- the noise sensorAll functions support reading a time averaged value. For exampleget_temperature(num=5, delay=0.3)returns average of 5 temperature readings,delayis time between each reading in seconds.
The default values are:num=1anddelay=0.ExamplefromenvirohatimportEnviroHAThat=EnviroHAT()print("Tepmerature:",hat.get_temperature(),"°C")print("Humidity:",hat.get_humidity(num=5,delay=0.3),"%")print("Raw ALS:",hat.ltr.get_raw_als())
Package: environconfig
environconfigallows you to use environment variables in Python
with a declarative syntax.A quick example:fromenvironconfigimportEnvironConfigfromenvironconfigimportStringVar,IntVarclassDBCfg(EnvironConfig):"""Database configuration from the environment."""HOSTNAME=StringVar(default='localhost')PORT=IntVar(default=3306)USERNAME=StringVar()PASSWORD=StringVar()CHARSET=StringVar(default='utf8mb4')NAME=StringVar(default='mydatabase')# Now you can start using itconnection=pymysql.connect(host=DBCfg.HOSTNAME,user=DBCfg.USERNAME,password=DBCfg.PASSWORD,db=DBCfg.NAME,charset=DBCfg.CHARSET,cursorclass=pymysql.cursors.DictCursor)You can check more examples in theexamplesdirectory.FeaturesBuilt-in basic types: String, Bool, Int, Float…Easy Customizable:CustomVar(just pass a callable to make the conversion)No mocking necessary for testing: Just instantiate your config with a dictionary.Easy build complex constructions with environment data: SeeMethodVarCollaborationWe are always open to pull requests and accept new var types.