Saravanan666/pypi-org huggingface dataset:
Package: ecnu-openapi-sdk-python
Python-SDK能力授权模式（token 管理）client_credentials 模式password 模式authorization code 模式接口调用GETPOSTPUTDELETE数据同步（接口必须支持翻页）全量同步同步为 csv 格式同步为 xls/xlsx 格式同步到数据库同步到模型增量同步（接口必须支持ts增量参数）同步到数据库同步到模型依赖python 3.10 +requirements.txt相关资料oauth2.0sqlalchemy支持的数据库理论上只要 sqlalchemy支持的数据库驱动都可以支持，以下是测试的情况如果sqlalchemy无法直接支持，可以先同步到模型，然后自行处理数据入库的逻辑。数据库驱动测试情况upsert 支持MySQLpymysql测试通过todoSQLitenull测试通过todoPostgreSQLpsycopg2测试通过todoSQL Serverpymssql测试通过todoOraclecx_oracle测试通过todo示例详见以下示例代码，和示例代码中的相关注释CallAPISyncToCSVSyncToModelSyncToDB性能性能与 ORM 的实现方式（特别是对 upsert 的实现方式），数据库的实现方式，以及网络环境有关，不一定适用于所有情况。当同步到数据库时，SDK 会采用分批读取/写入的方式，以减少内存的占用。当同步到模型时，则会将所有数据写入到一个数组中，可能会占用较大的内存。以下是测试环境同步程序运行环境i5 cpu32G 内存windows10 X64WD 固态硬盘dotnet 4.8测试接口信息/api/v1/sync/fake使用 pageSize=2000 仅限同步接口请求耗时约 0.2 - 0.3 秒接口数据示例{"errCode":0,"errMsg":"success","requestId":"73a60094-c0f1-4daf-bc58-4626fbef7a2b","data":{"pageSize":2000,"pageNum":1,"totalNum":10000,"rows":[{"id":1,"colString1":"Oxqmn5MWCt","colString2":"mzavQncWeNlOlFgUW7HC","colString3":"mvy6K1HU7rdCicPbvvA3rNZcDWPhvV","colString4":"XGsK5NVQHOu4JrmHZ9ZL1iLf0UYpdIvNIzswULzb","colInt1":3931594532918648027,"colInt2":337586114254574578,"colInt3":2291922259603323213,"colInt4":3000562485500051124,"colFloat1":0.46541339000557547,"colFloat2":0.6307996439929248,"colFloat3":0.9278393850101392,"colFloat4":0.7286866920659677,"colSqlTime1":"2023-10-20 22:02:07","colSqlTime2":"2023-10-20 22:02:07","colSqlTime3":"2023-10-20 22:02:07","colSqlTime4":"2023-10-20 22:02:07"}]}}测试结果数据库：本地mysql:5.7 (docker环境)pageSize = 2000batchSize = 100数据量(totalNum)Time Spent onDirect CallAPITime Spent onModel SyncTime Spent onDB Sync1w0.3246151.1924626.55116310w0.2803157.83646730.583456100w0.2831378.528211263.68381数据量(totalNum)Memory Spent onModel SyncMemory Spent onDB Sync1w3.074218753.1289062510w107.26562515.22265625100w695.17187512.56640625注意事项1OAuth2身份认证+鉴权initOauth2ClientCredentials方法可以实现对token的自动续约与管理，指定client_id与client_secret即可2 同步到csv文件SyncToCSV使用案例在exampleSyncToCSV()方法中，开发者仅需在example_csv.py文件中进行配置即可。仅需配置api参数，包括url、pageSize等，还需配置写入的文件名。3 同步到数据模型SyncToModel因为写入到csv文件中的数据都是字符串类型，为满足开发者需求，提供同步数据到Model的功能。使用案例在exampleSyncToModel()方法中，开发者仅需在example_model.py文件中进行配置即可。配置：Model类型，api，指定Model对象4 同步到数据库SyncToDB使用案例在exampleSyncToDB()方法中，开发者仅需在example_db.py文件中进行配置即可。ORM：sqlalchemy该sdk提供全量与增量刷新数据到DB中，支持数据库MySQL（建议）、Oracle、PostgrelSQL、SQLServer目前暂时不支持upsert，全量刷新时建议删除原本存在的表结构，增量同步时则不需要。配置如下：数据库、api、映射类，注意若接口返回的数据存在id，一般无需指定自增
Package: eco
Python Eco is a bridge to theEcoCompiler.Python Ecoimport eco

eco.compile(open("template.eco"))
# Out: u"function(...) {...}"

context = eco.context_for("Hello <%= @name %>")
context.call("render", {"name": "Sam"})
# Out: u'Hello Sam'

eco.render("Hello <%= @name %>", name="world")
# Out: u'Hello world'Setup$ pip install ecoLicenseMIT License
Package: eco4cast
eco4castAbout eco4cast :clipboard:Installation :wrench:Usage examples :computer:CitingAbout eco4cast :clipboard:This package is designed to reduce CO2 emissions while training neural network models. The main idea of the package is to run the learning process at certain time intervals on certain Google Cloud servers with minimal emissions. A neural network (TCN) trained on the historical data of 13 zones is used to predict emissions for 24 hours ahead.Currently supported Google Cloud zones: 'southamerica-east1-b', 'northamerica-northeast2-b', 'europe-west6-b', 'europe-west3-b', 'europe-central2-b', 'europe-west1-b', 'europe-west8-a', 'northamerica-northeast1-b', 'europe-southwest1-c', 'europe-west2-b', 'europe-north1-b', 'europe-west9-b',  'europe-west4-b' .InstallationPackage can be installed using Pypi:pip install eco4castUsage examplesThere are several usage examples you can use to start working with eco4cast package. They are listed inexamples folder.Example of using eco4cast with Google CloudYou can use eco4cast to reduce your carbon footprint with the help of Google Cloud virtual machines and moving between zones to reach minimal emission coefficient. In this Colab notebook you can find step-by-step tutorial on setting up your first training process using eco4cast and Google CloudExample of using eco4cast locallyYou can use eco4cast to reduce your carbon footprint by training during times with minimal emission in your region. In this Colab notebook you can find step-by-step guide on starting training locally.Available electricitymaps zones to work locally:
"BR-CS" (Central Brazil), "CA-ON" (Canada Ontario) , "CH" (Switzerland), "DE" (Germany),
"PL" (Poland), "BE" (Belgium), "IT-NO" (North Italy), "CA-QC" (Canada Quebec), "ES" (Spain),
"GB" (Great Britain), "FI" (Finland), "FR" (France) "NL" (Netherlands)CitingPaper info
Package: ecoaliface
ecoalifacePure Python interface toeCoalwater boiler controller fromeSterownik.pl.
Implements small subset of operations/readings available in controller.Based on code fromhttps://github.com/uzi18/sterownik.Versions0.5.0Added all methods available inhttps://github.com/uzi18/sterownikcode.
git tag -a v0.5.0 -m "Version 0.5.0"0.4.0Initial public release for Homeassistant component.
Package: ecobici
Ecobici python wrapperInstallationpip install ecobiciUsage# Import modulefromecobiciimportEcobici# Initialize clientclient=Ecobici(your_client_id,your_client_secret)# Get dictionary containing stationsstations=client.get_stations()# Get dictionary containing the status of stationsstations_status=client.get_stations_status()# (Optional) Force refresh tokenclient.refresh_token()ExamplesGet the name of the first stationfromecobiciimportEcobiciclient=Ecobici(your_client_id,your_client_secret)list_of_stations=client.get_stations()["stations"]print("The name of the first station is ",list_of_stations[0]["name"])Check the Data structure section for more informationGet the status of the third stationfromecobiciimportEcobiciclient=Ecobici(your_client_id,your_client_secret)list_of_stations=client.get_stations_status()["stationsStatus"]print("The status of the third station is ",list_of_stations[3]["status"])Check the Data structure section for more informationData structureStations structureThis module translate the json objects to python objects and returns it to the user,
it doesn't unwraps it because I didn't want to modify the data.The econduce's API returns data in the following json format,
that's why you have to manually unwrap it withclient.get_stations_status()["stations"]:{
    "stations": [
        {
            "id": 448,
            "name": "448 DR. ANDRADE - ARCOS DE BELÉN",
            "address": "DR. ANDRADE ARCOS DE BELÉN",
            "addressNumber": "S/N",
            "zipCode": null,
            "districtCode": null,
            "districtName": null,
            "altitude": null,
            "nearbyStations": [
                448
            ],
            "location": {
                "lat": 19.426611,
                "lon": -99.14447
            },
            "stationType": "BIKE,TPV"
        },
    ]
}Structure and typesKeyTypeidintnamestraddressstraddressNumberstrzipCodestrdistrictCodestrdistrictNamestrnearbyStationslist with id (int)locationliststationTypestrLocation list:KeyTypelatfloatlonfloatLatitud and logitud are coordinates based on theWorld Geodetic System (WGS84).Status structureThis module translate the json objects to python objects and returns it to the user,
it doesn't unwraps it because I didn't want to modify the data.The econduce's API returns data in the following json format,
that's why you have to manually unwrap it withclient.get_stations_status()["stationsStatus"]:{
    "stationsStatus": [
        {
            "id": 1,
            "status": "OPN",
            "availability": {
                "bikes": 4,
                "slots": 23
            }
        },
    ]
}Structure and typesKeyTypeidintstatusstr (OPN means open, CLS means closed)availabilitylistAvailability list:KeyTypebikesintslotsintTestpython3 -m pytest ecobici/test.pyNotesThere's no need to refresh the token when it expires. The client does it automatically.Ecobici's API can returnnullvalues. It's up to you to verify that the value you want to access if defined.You can find more information about the API structure here:Spanish documentation.
Package: ecobp
Ecoindex Python FullstackEcoindex Python FullstackProjectsGetting startedRequirementsInstallationUsageDisclaimerLicenseContributingCode of conductThis project is a polylith repository for the Ecoindex project. It is called "fullstack" because it contains all the components of the project, including the backend that is used in production, but also a CLI tool and modules that can be used in other projects.You can get more information about polylith in theofficial documentationand in thepython-polylith toolthat is used to manage this repository.ProjectsThis repository contains the following projects:Ecoindex Compute: this is the base module that provides a simple interface to get theEcoindexbased on 3 parameters:The number of DOM elements in the pageThe size of the pageThe number of external requests of the pageEcoindex Scraper: This module provides a simple interface to get theEcoindexbased on a URL. It usesPlaywrightto get the DOM elements, size and requests of the page.Ecoindex CLI: This module provides a CLI tool to get theEcoindexbased on a URL. It uses theEcoindex Scrapermodule.Ecoindex API: This module provides a REST API to get theEcoindexbased on a URL. It uses theEcoindex Scrapermodule.Here is a diagram of the dependencies between the projects:Getting startedRequirementsPython 3.9+PoetryTaskDocker(optional)InstallationTo install main dependencies, run:taskpoetry:installUsageHave a look at the task help:task--listDisclaimerThe LCA values used byecoindexto evaluate environmental impacts are not under free license - ©Frédéric Bordage
Please also refer to the mentions provided in the code files for specifics on the IP regime.LicenseContributingCode of conduct
Package: ecocal
Economic CalendarOverviewecocalis a light-weight and easy-to-user Python package allowing every developer to retrieve full access to both historical and future insightful and hifhly-detailed economic calendar (worldwide scale).DISCLAIMER:Data extracted from external providers. No warranty on data quality/accuracy.Data providedAS ISfor information purpose only.Getting startedInstall fromPyPI:Installecocalpackagepip3installecocalExecute the example codefromecocalimport*defmain()->None:ec=Calendar(startHorizon="2023-10-26",endHorizon="2023-11-30",withDetails=True,nbThreads=20,preBuildCalendar=True,)print(ec)# On-disk saving of detailed calendarec.saveCalendar()if__name__=="__main__":main()Code available using:python examples/main.pyjupyter-notebook examples/main.ipynb(dynamic debugging)Install fromsourceClone the repository:gitclonehttps://github.com/lcsrodriguez/ecocal.gitcdecocal/Create a virtual environment forcleanenvironmentpython3-mvenvvenvsourcevenv/bin/activateInstall the required Python packagespip3install-rrequirements.txt
pip3freezeInitiate the projectmakeinitProject's architecture./
├── CITATION.cff
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── ecocal/
│   ├── Calendar.py
│   ├── Event.py
│   ├── __init__.py
│   ├── constants.py
│   └── utils.py
├── examples/
│   ├── main.ipynb
│   └── main.py
├── requirements.txt
└── setup.pyLicense & CreditsLucas RODRIGUEZTheLICENSEfile contains the full license details.If you are using this package for research purposes, you can quote it as shown below(BibTeX format):@software{RODRIGUEZ_ecocal_2023,author={RODRIGUEZ,Lucas},month=dec,title={{ecocal}},url={https://github.com/lcsrodriguez/ecocal},version={1.2.1},year={2023}}
Package: ecodatatk
## Eco-Data Manage Toolkit
Eco-Data Manage Toolkit is a Python toolkit is a set of tools to facilitate data management for hydrology/limnology applications.In this first version, it is only capable of reading data in NetCDF format. Its features include:Reading dataSpatial and temporal filtersSpatial and temporal interpolationExport to .tif and .csv formats## Installation
To install lastest release version, usepip install ecodatatk.#### Microsoft Windows installation
If the GeoPandas package is not installed, it is suggested that it be installed manually using [Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html):conda install -c conda-forge geopandas## Application Examples
Applications can be found in Jupyter Notebooks, in the./Examplesdirectory in this repository.## Help
You can use thehelp()to get more information about the methods uses and parameters.## License
[BSD 3-Clause License](LICENSE)
Package: ecode
ecode-py:musical_score: The emoji code utilities for PythonRequirementsPython 3.6 or laterGetting startedPip$pipinstallecodePoetry$poetryaddecodeUsageEncodingfromecodeimport*ecode=Ecode(locale=EcodeLocale.EN,flags=frozenset(EcodeFlag.SIZE_FIXED,EcodeFlag.STRETCH),align=EcodeAlign.CENTER,size=EcodeSize.XHDPI,format=EcodeFmt.WEBP,font_id=0xcf,foreground_color=0x12345678,background_color=0x9abcdef0,text='ab\nc')code=EcodeEncoder().encode(ecode)print(code)#=> 'BA0hzxI0VniavN7wYWIKYw'DecodingfromecodeimportEcodeDecoderecode=EcodeDecoder().decode('BA0hzxI0VniavN7wYWIKYw')print(ecode.text)#=> 'ab\nc'DevelopmentYou should installPoetryfirst to develop.$pipinstallpoetryInstall requirements$poetryinstallUpgrade requirements$poetryupdateTest$poetryrunpytest# Test$poetryrunmypy-pecode# Type checkingPublish$./scripts/publish-pypi.shPorted projectsNameLanguageecode-javaJavaecode-jsJavaScriptLicenseMIT ©Emoji Generator
Package: ecodev-core
ecodev-coreLow level ecoact generic code. Aimed at being published in open source with poetryInstallation of this packageYou are strongly encouraged to install this package via Docker.Starting from a project with a Docker file:add the module ecodev-core in therequirements.txtfilemake sure the.envfile includes all required fields (seeBaseSettingsandAuthenticationConfiguration)build the new version of the Docker container (typicallydocker build --tag xxx .)run it with docker compose (dc up -d).DocumentationPlease find it in theassociated mkdoc website!
Package: ecoengine
EcosizerEngineRequirements:This software requires a python version greater than or equal to 3.11 to be installed in the environment it is running in.Using the package in scripts:Install the package with pip$ pip install ecoengineTo import and use the tools in this package, add the following import statement to your script:from ecoengine import *You should now be able to use the features of EcosizerEngine in your scriptRunning locally in a container:First, clone the EcosizerEngine repo from github$ git clone https://github.com/EcotopeResearch/EcosizerEngine.gitDepending on what type of environment you want to run the code in, please follow the appropriate steps.Steps for installing in a virtual environment:Navigate to the EcosizerEngine directory. This should be the same directory level as src/, setup.py, and this README document.Run the following command:$ pip install -e .This will install the ecosizer-engine package locally in editable format, such that changes you make in the source code here will be reflected in implementation.
This pip install should also install all dependencies for ecosizer-engine (i.e. numpy, scipy, pytest, and plotly)Steps for installing using docker container:Navigate to the EcosizerEngine directory.Build container with docker file$ docker build -t ecosizerengine:latest .Run docker container$  docker run -it ecosizerengine bashWhen you are done messing about in the docker image, just type the command$ exitor press ctrl+c then ctrl+dSteps for installing conda environment from the Anaconda prompt:Navigate to the EcosizerEngine directory.Create new environment from .yml file.$ conda env create --file EcosizerEngine.ymlIf the environment creation doesn't work, make sure Anaconda is up-to-date with$ conda update --allIf that doesn't work, you may need to force Anaconda to download and use python 3.11 (it defaults to 3.9) by making another environment$ conda create -n py311 python=3.11
$ conda activate py311
$ conda env create --file EcosizerEngine.ymlCheck that the environment was created$ conda env listActivate the new environment$ conda activate EcosizerEngineIf an environment already exits it can be removed with:$ conda remove --name EcosizerEngine --allAll the available environment can be found with:$ conda env listTesting:From the parent directory, type$ python -m pytestThis will run all unit tests for the packageUpdating Documentation:If not installed in environment: pip install sphinx and numpydocnavigate to docs directory and run:$ make htmlUpdating version on pypiIf you haven't installed them before, pip install build and twine$ python -m pip install --upgrade build$ python -m pip install --user --upgrade twineUpdate the version number in setup.cfgRun the following commands from the project root directory:$ python -m build$ python -m twine upload dist/*Contact InformationTo get in touch with Ecotope Inc. go here:http://ecotope.com/contact/
Package: ecofaber
InstallationLinuxsudoapt-getinstallpython3-pyqt5.qtopenglfreeglut3-dev
pip3installecofaberWindowspip3installecofaberExampleExample1.pyimportnumpyasnpimportecofaberimportecofaber.basemodelasbm@bm.registerclassModel(bm.ModelElement):def__init__(self,data=None):super().__init__(data)self.angle=0defupdate(self):self.angle+=0.1defgetView(self):view=[]view.append({"name":"b_cube_1","pos":[10*np.cos(self.angle),10*np.sin(self.angle),0],"color":[200,100,0],})view.append({"name":"b_ring_3","pos":[0,0,0],"color":[200,100,0],})returnviewdefgetObj(self,pos):returnNoneecofaber.launch(Model)Execute the following codegitclonegit@github.com:flokapi/ecofaber.gitcdecofaber/example
python3example1.pyThis will open the application with the model. You can now start the simulation, control the speed, the view, ...Use the left click to move, the right click to rotate and scroll to zoom in/out.
Package: ecoflow
Ecoflow Python APIPython library for communicating with Ecoflow power stations over BLE, based on bleak.Supported featuresDelta 2 device is the only supported for now. Extending support is plannedFeature \ DeviceDelta 2River 2Output circuit control - AC+pendingOutput circuit control - DC+pendingOutput circuit control - USB+pendingReading output circuits state+pendingReading charge level+pendingReading configured charging speed+pendingReading configured min/max charging speed thresholds+pendingReading realtime charging speed - AC input+pendingReading realtime charging speed - Solar input-pendingUsageimport asyncio
import bleak
from ecoflow import Delta2, OutputCircuit

async def main():
    mac = "00:00:00:00:00:01"
    ble_client = bleak.BleakClient(mac, timeout=15)
    async with Delta2(ble_client) as dev:
        await dev.turn_on_circuit(OutputCircuit.USB)
        await dev.turn_off_circuit(OutputCircuit.AC)

        await dev.start_state_stream(print_state)
        await asyncio.sleep(40)
        await dev.stop_state_stream()

async def print_state(data):
    print("state update...")
    for k, v in data.items():
        print(f"{k} = {v}")
    print("-"*20)

asyncio.run(main())Note to understand the example completely one may need to refer to:bleakhttps://github.com/hbldh/bleakPython asynciohttps://realpython.com/async-io-python/
Package: ecoflux
ecofluxWu Sunecofluxis a Python package that provides core functions to calculate
ecosystem–atmosphere exchanges of energy, water, carbon, and trace gases.WARNING: The project is in an experimental stage. There is no stable release
yet.RequirementsPython (>= 3.6)NumPySciPyPyScaffold (for nightly version only)NOTE: This package will not work under Python 2.InstallationA convenient way to install this package is throughpip:pipinstallecofluxAlternative, to install the nightly version:gitclonehttps://github.com/wusunlab/ecofluxcdecoflux
python3setup.pydevelopLicenseecofluxis released under the MIT license. See theLICENSEfile.ContributingThis is a personal project that has not been funded by any institutional grant.Bug reports, pull requests, comments, and suggestions are all welcome. If you
would like to contribute to this project, please leave me a note at theGitHub issues pageor email me atwusun at protonmail.com.
Package: ecoindex_compute
Ecoindex pythonThis basic module provides a simple interface to get theEcoindexbased on 3 parameters:The number of DOM elements in the pageThe size of the pageThe number of external requests of the pageRequirementsPython ^3.10 withpipInstallpipinstallecoindex_computeUseGet ecoindexYou can easily get the ecoindex by calling the functionget_ecoindex():(function)get_ecoindex:(dom:int,size:float,requests:int)->Coroutine[Any,Any,Ecoindex]Example:importasynciofrompprintimportpprintfromecoindex.computeimportget_ecoindex# Get ecoindex from DOM elements, size of page and requests of the pageecoindex=asyncio.run(get_ecoindex(dom=100,size=100,requests=100))pprint(ecoindex)Result example:Ecoindex(grade='B',score=72.0,ges=1.56,water=2.34,ecoindex_version='3.0.0')
Package: ecoindex-monorepo-benep
Ecoindex Python FullstackEcoindex Python FullstackProjectsGetting startedRequirementsInstallationUsageDisclaimerLicenseContributingCode of conductThis project is a polylith repository for the Ecoindex project. It is called "fullstack" because it contains all the components of the project, including the backend that is used in production, but also a CLI tool and modules that can be used in other projects.You can get more information about polylith in theofficial documentationand in thepython-polylith toolthat is used to manage this repository.ProjectsThis repository contains the following projects:Ecoindex Compute: this is the base module that provides a simple interface to get theEcoindexbased on 3 parameters:The number of DOM elements in the pageThe size of the pageThe number of external requests of the pageEcoindex Scraper: This module provides a simple interface to get theEcoindexbased on a URL. It usesPlaywrightto get the DOM elements, size and requests of the page.Ecoindex CLI: This module provides a CLI tool to get theEcoindexbased on a URL. It uses theEcoindex Scrapermodule.Ecoindex API: This module provides a REST API to get theEcoindexbased on a URL. It uses theEcoindex Scrapermodule.Here is a diagram of the dependencies between the projects:Getting startedRequirementsPython 3.9+PoetryTaskDocker(optional)InstallationTo install main dependencies, run:taskpoetry:installUsageHave a look at the task help:task--listDisclaimerThe LCA values used byecoindexto evaluate environmental impacts are not under free license - ©Frédéric Bordage
Please also refer to the mentions provided in the code files for specifics on the IP regime.LicenseContributingCode of conduct
Package: ecoji
# Ecoji 🏣🔉🦐🔼Ecoji encodes data as 1024 [emojis][emoji], its base1024 with an emoji character set.  As a bonus, includes code to decode emojis to original data.
The idea is from [here](https://github.com/keith-turner/ecoji). And this project is the implemention of Python3.## Installingwith pip`bash $pip install ecoji `with source code`bash $git clonegit@github.com:mecforlove/ecoji-py.git&& cdecoji-py&& python3 setup.py install `## For CLI usageencode`base $echo-nhello | ecoji👲🔩🚗🌷`decode`bash $echo-n👲🔩🚗🌷| ecoji-dhello% `If you want to know more about the CLI, just typeecoji -hin your terminal.## For python libencode`python >>> import io >>> from ecoji import encode >>> r = io.BytesIO(b'hello') >>> w = io.StringIO() >>> encode(r, w) >>>print(w.getvalue())👲🔩🚗🌷`decode`python >>> import io >>> from ecoji import decode >>> r =io.StringIO('👲🔩🚗🌷')>>> w = io.BytesIO() >>> decode(r, w) >>>print(w.getvalue())b'hello' `Last but not the least, only Python3.x is supported.