Saravanan666/pypi-org huggingface dataset:
Package: aiobiketrax
aiobiketraxPython library for interacting with the PowUnity BikeTrax GPS tracker.IntroductionThis library is mainly written to work with a custom component for
Home Assistant. You can find this custom componenthere.ThePowUnity BikeTraxis a GPS tracker for electric
bicycles. It provides real-time updates every when the bike is in motion, using
a 2G modem. It works in Europe, and requires a subscription after a trial
period of one year.FeaturesMulti-device support.Traccar and admin API support.Live updates using websocket.Not implemented:Geofencing.Global configuration, such as webhooks.Known issuesTheschemasof the models haven been
reversed-engineerd by observing responses for a small number of devices. It is
likely that responses of other devices do not map onto the current models. For
example, some properties are not set if they have never been configured from
the app.Please open an issue, and provide some responses so that the schemas can be
improved. Be sure to redact sensitive information, such as locations, unique
identifiers and personal details.DebuggingIn case of issues, it is possible to enable logging in your application for the
following loggers:aiobiketrax.api- API logging.aiobiketrax.api.responses- Additional API response logging.aiobiketrax.api.client- Client interaction logging.UsageIn codefromaiobiketraximportAccountimportaiohttpasyncwithaiohttp.ClientSession()assession:account=Account(username="someone@example.org",password="secret",session=session)awaitaccount.update_devices()fordeviceinaccount.devices:print(device.name)CLIFor demonstration and testing purposes, one can use the CLI as well. If you
have the package installed, usebiketrax --helpcommand to get started.Mock serverFor development, a mock server is included incontrib/mock/. Simply runserver.pyand adaptaiobiketrax/consts.pyto use other endpoints.API_TRACCAR_ENDPOINT="http://localhost:5555/traccar/api"API_ADMIN_ENDPOINT="http://localhost:5555/admin/api"Do note that authentication is not mocked.ContributingSee theCONTRIBUTING.mdfile.LicenseSee theLICENSE.mdfile (MIT license).DisclaimerUse this library at your own risk. I cannot be held responsible for any
damages.This page and its content is not affiliated with PowUnity.
Package: aiobittrexapi
Python Async Bittrex API WrapperThis package is used by the Bittrex integration of Home Assistant.Available functionsThe following functions are available:fromaiobittrexapiimportBittrexapi=Bittrex(api_key,api_secret)api.get_account()api.get_balances()api.get_closed_orders()api.get_markets()api.get_open_orders()api.get_tickers()ExamplefromaiobittrexapiimportBittrexfromaiobittrexapi.errorsimport(BittrexApiError,BittrexResponseError,BittrexInvalidAuthentication,)importasynciofromtypingimportOptionalAPI_KEY=""API_SECRET=""asyncdefmain(api_key:Optional[str]=None,api_secret:Optional[str]=None):ifapi_keyandapi_secret:api=Bittrex(api_key,api_secret)else:api=Bittrex()try:# Get the active markets from Bittrex - works without secret & keymarkets=awaitapi.get_markets()print(markets)# Get the tickerstickers=awaitapi.get_tickers()print(tickers)# Get your account data - requires secret & keyaccount=awaitapi.get_account()exceptBittrexApiErrorase:print(e)exceptBittrexResponseErrorase:print("Invalid response:",e)exceptBittrexInvalidAuthentication:print("Invalid authentication. Please provide a correct API Key and Secret")else:print(account)finally:awaitapi.close()if__name__=="__main__":loop=asyncio.get_event_loop()ifAPI_KEYandAPI_SECRET:loop.run_until_complete(main(API_KEY,API_SECRET))else:loop.run_until_complete(main())Feedback & Pull RequestsAll feedback and Pull Requests are welcome!DevelopmentDon't forget to create your venvpython3-mvenvvenvsourcevenv/bin/activate
Package: aiobml
This is an asynchronous wrapper around Bank of Maldives API.How it worksCurrently you can use this library to get the transaction history of all your Bank of Maldives accounts, details of all you BML accounts & contacts and add & remove contacts.
If you want to check for new transactions; save the transactions to a db, check, alert and add any transactions that's not currently saved to the dbcheck the basic example below.Async Bank of Maldives (BML) APIThis library is not fully completed yet. As of now it can be used to get the transactions done within the last 24 - 48 hours, get all the information about your Accounts and your contacts and add & remove contacts.scroll to the end to see the to do list of this librarysetupYou must have python 3 installedusing PIP$ pip install -U aiobmlFrom Source$ git clone https://github.com/quillfires/aioBML.git$ cd aioBML$ python setup.py installBasic ExampleimportasynciofromaiobmlimportasyncBMLloop=asyncio.get_event_loop()bank=asyncBML(username="your_user_name",password="your_password")asyncdefstart_bank_client():awaitbank.start()@bank.event('new_transaction')asyncdefon_new_transaction(transaction):print(transaction)# on app reboot, event will trigger for all the transactions within 24 hours# Use a db to avoid being notified of the same transaction.# check if transaction is in your db# if not, save to db and alert about the transactionasyncdefcontacts():data=awaitbank.get_contacts()print(data)# show all the contacts you have savedasyncdefaccounts():data=awaitbank.get_accounts()print(data)# show all the accounts you have in Bank of Maldivesasyncdefadd_cont(account,name):added_acc=awaitbank.add_contact(account,name)print(added_acc)# adds the account your contact list# throws DuplicateContent error if it is already in the contact listasyncdefdelete_cont(account):awaitbank.delete_contact(account)# deletes the first match from your contact list# account can be the account number or the saved nameif__name__=='__main__':try:loop.run_until_complete(start_bank_client())except(KeyboardInterrupt,SystemExit):passfinally:loop.run_until_complete(bank.close())ChanglogSee the change log hereTodoGet todays historyGet Account detailsGet contactsAdd contactsDelete contactsGet history from a date rangeMake Transfer to a given account numberMake transfers to contacts.
Package: aiobosest
AboutPowered by the Bose® SoundTouch®Developers API.FeaturesSupport GET and POST using the REST APIWebSocket connection to receive updates from the systemGetting StartedA simple client example is provided on the examples/ directory.Documentationhttps://aiobosest.readthedocs.io/RequirementsPython >= 3.5aiohttplxmlzeroconfLicenseaiobosestis offered under theGPLv3license.Source codeThe latest version is available in a github repository:https://github.com/trunet/aiobosest
Package: aio-botocore
The sole purpose of this fork is to release a version of
[aiobotocore](https://github.com/aio-libs/aiobotocore) with
relaxed constraints on the dependencies for botocore and boto3.
This should enable algorithms for resolving dependencies to
work more efficiently with this library.Hopefully any risks in relaxing the versions allowed for
botocore and boto3 are minimal.  However, use at your own
risk (i.e. use your own unit tests and test coverage to
manage your risks).If the original library works for your purposes, use it
instead of this library.  If changes to this library are working,
some form of the changes might get integrated into the original
project.  If so, hopefully this library will cease to exist
(or at least cease to be maintained in this form).Install$ pip install aio-botocoreThe original library is installed using$ pip install aiobotocore
Package: aiobotocore-botorange
Async client for amazon services usingbotocoreandaiohttp/asyncio.Main purpose of this library to support amazon s3 api, but other services
should work (may be with minor fixes). For now we have tested
only upload/download api for s3, other users report that SQS and Dynamo
services work also. More tests coming soon.Install$ pip install aiobotocoreBasic ExampleimportasyncioimportaiobotocoreAWS_ACCESS_KEY_ID="xxx"AWS_SECRET_ACCESS_KEY="xxx"asyncdefgo(loop):bucket='dataintake'filename='dummy.bin'folder='aiobotocore'key='{}/{}'.format(folder,filename)session=aiobotocore.get_session(loop=loop)asyncwithsession.create_client('s3',region_name='us-west-2',aws_secret_access_key=AWS_SECRET_ACCESS_KEY,aws_access_key_id=AWS_ACCESS_KEY_ID)asclient:# upload object to amazon s3data=b'\x01'*1024resp=awaitclient.put_object(Bucket=bucket,Key=key,Body=data)print(resp)# getting s3 object properties of file we just uploadedresp=awaitclient.get_object_acl(Bucket=bucket,Key=key)print(resp)# delete object from s3resp=awaitclient.delete_object(Bucket=bucket,Key=key)print(resp)# list s3 objects using paginatorpaginator=client.get_paginator('list_objects')asyncforresultinpaginator.paginate(Bucket=bucket,Prefix=folder):forcinresult.get('Contents',[]):print(c)# get object from s3response=awaitclient.get_object(Bucket=bucket,key=key)# this will ensure the connection is correctly re-used/closedasyncwithresponse['Body']asstream:bytes=awaitstream.read()loop=asyncio.get_event_loop()loop.run_until_complete(go(loop))Run TestsMake sure you have development requirements installed and your amazon key and
secret accessible via environment variables:$ cd aiobotocore
$ export AWS_ACCESS_KEY_ID=xxx
$ export AWS_SECRET_ACCESS_KEY=xxx
$ pip install -Ur requirements-dev.txtExecute tests suite:$ py.test -v testsMailing Listhttps://groups.google.com/forum/#!forum/aio-libsRequirementsPython3.4+aiohttpbotocoreChanges0.2.3 (XXXX-XX-XX)0.2.2 (2017-03-07)set aiobotocore.__all__ for * imports #121 (thanks @graingert)fix ETag in head_object response #1320.2.1 (2017-02-01)Normalize headers and handle redirection by botocore #115 (thanks @Fedorof)0.2.0 (2017-01-30)add support for proxies (thanks @jjonek)remove AioConfig verify_ssl connector_arg as this is handled by the
create_client verify paramremove AioConfig limit connector_arg as this is now handled by
by the Configmax_pool_connectionsproperty (note default is 10)0.1.1 (2017-01-16)botocore updated to version 1.5.00.1.0 (2017-01-12)Pass timeout to aiohttp.request to enforce read_timeout #86 (thanks @vharitonsky)
(bumped up to next semantic version due to read_timeout enabling change)0.0.6 (2016-11-19)Added enforcement of plain response #57 (thanks @rymir)botocore updated to version 1.4.73 #74 (thanks @vas3k)0.0.5 (2016-06-01)Initial alpha release
Package: aiobotocore-mirror
Async client for amazon services usingbotocoreandaiohttp/asyncio.Main purpose of this library to support amazon s3 api, but other services
should work (but may be with minor fixes). For now we have tested
only upload/download api for s3. More tests coming soon.Install$ pip install -e git+https://github.com/aio-libs/aiobotocore.git@master#egg=aiobotocoreBasic ExampleimportasyncioimportaiobotocoreAWS_ACCESS_KEY_ID="xxx"AWS_SECRET_ACCESS_KEY="xxx"@asyncio.coroutinedefgo(loop):bucket='dataintake'filename='dummy.bin'folder='aiobotocore'key='{}/{}'.format(folder,filename)session=aiobotocore.get_session(loop=loop)client=session.create_client('s3',region_name='us-west-2',aws_secret_access_key=AWS_SECRET_ACCESS_KEY,aws_access_key_id=AWS_ACCESS_KEY_ID)# upload object to amazon s3data=b'\x01'*1024resp=yield fromclient.put_object(Bucket=bucket,Key=key,Body=data)print(resp)# getting s3 object properties of file we just uploadedresp=yield fromclient.get_object_acl(Bucket=bucket,Key=key)print(resp)# delete object from s3resp=yield fromclient.delete_object(Bucket=bucket,Key=key)print(resp)loop=asyncio.get_event_loop()loop.run_until_complete(go(loop))Run TestsMake sure you have development requirements installed and your amazon key and
secret accessible via environment variables:$ cd aiobotocore
$ export AWS_ACCESS_KEY_ID=xxx
$ export AWS_SECRET_ACCESS_KEY=xxx
$ pip install -Ur requirements-dev.txtExecute tests suite:$ py.test -v testsRequirementsPython3.3+asyncioorPython3.4+aiohttpbotocoreChanges0.0.1 (xxxx-xx-xx)Initial release
Package: aiobotocore-refreshable-credentials
aiobotocore-refreshable-credentialsImplements an aiobotocore.Session subclass for using aiobotocore with expiring
credentials (IAM STS).Usageimportaiobotocore_refreshable_credentialssession=aiobotocore_refreshable_credentials.get_session()asyncwithsession.create_client('rekognition')asclient:...Python Versions Supported3.8+
Package: aiobotstat
aiobotstatMini library forBotStat API.Current API version: 0.1InstallGit:pip install git+https://github.com/viuipan/aiobotstat.gitPyPi:pip install aiobotstatExample:importasynciofromaiobotstatimportBotStatAPIBOT_TOKEN=''FILE_PATH=''BOT_USERNAME=''api=BotStatAPI(BOT_TOKEN)asyncdefmain():bot_info=awaitapi.get_bot_info(username=BOT_USERNAME)print(bot_info)task=awaitapi.create_task(file=FILE_PATH)print(task)status=awaitapi.get_task_status(task_id=task.id)print(status)cancel_result=awaitapi.cancel_task(task_id=task.id)print(f'Cancel result is{cancel_result}')asyncio.run(main())
Package: aiobp
Boilerplate for asyncio serviceThis module provides boilerplate for microservices written in asyncio:Runner with task reference handler and graceful shutdownConfiguration providerLogger with color supportimportasynciofromaiobpimportrunnerasyncdefmain():try:awaitasyncio.sleep(60)exceptasyncio.CancelledError:print('Saving data...')runner(main())More complex exampleimportasyncioimportaiohttp# just for exampleimportsysfromaiobpimportcreate_task,on_shutdown,runnerfromaiobp.configimportInvalidConfigFile,sys_argv_or_filenamesfromaiobp.config.confimportloaderfromaiobp.loggingimportLoggingConfig,add_devel_log_level,log,setup_loggingclassWorkerConfig:"""Your microservice worker configuration"""sleep:int=5classConfig:"""Put configurations together"""worker:WorkerConfiglog:LoggingConfigasyncdefworker(config:WorkerConfig,client_session:aiohttp.ClientSession)->int:"""Perform service work"""attempts=0try:asyncwithclient_session.get('http://python.org')asresp:assertresp.status==200log.debug('Page length%d',len(awaitresp.text()))attempts+=1awaitasyncio.sleep(config.sleep)exceptasyncio.CancelledError:log.info('Doing some shutdown work')awaitclient_session.post('http://localhost/service/attempts',data={'attempts':attempts})returnattemptsasyncdefservice(config:Config):"""Your microservice"""client_session=aiohttp.ClientSession()on_shutdown(client_session.close,after_tasks_cancel=True)create_task(worker(config.worker,client_session),'PythonFetcher')# you can do some monitoring, statistics collection, etc.# or just let the method finish and the runner will wait for Ctrl+C or killdefmain():"""Example microservice"""add_devel_log_level()try:config_filename=sys_argv_or_filenames('service.local.conf','service.conf')config=loader(Config,config_filename)exceptInvalidConfigFileaserror:print(f'Invalid configuration:{error}')sys.exit(1)setup_logging(config.log)log.info("Using config file:%s",config_filename)runner(service(config))if__name__=='__main__':main()
Package: aiobravado
AiobravadoAboutAiobravado is the asyncio version of thebravado libraryfor use with theOpenAPI Specification(previously
known as Swagger).aiobravado requires Python 3.5+ and allows you to use asynchronous programming when interacting with OpenAPI-enabled
services. Here’s the breakdown of bravado packages and their use case:bravado- Library to dynamically interact with OpenAPI/Swagger-enabled services. Supports Python 2.7+.fido- HTTP client to enable asynchronous network requests for bravado. Supports Python 2.7+. Depends on twisted. Spins up a separate thread to handle network requests.bravado-asyncio- asyncio-powered asynchronous HTTP client for bravado. Requires Python 3.5+. It is the default HTTP client for aiobravado, but can be used with bravado as well.aiobravado - asyncio-enabled library to dynamically interact with OpenAPI/Swagger-enabled services. Supports basically all of the features of bravado. Requires Python 3.5+. No additional threads are created.Example Usagefromaiobravado.clientimportSwaggerClientclient=awaitSwaggerClient.from_url('http://petstore.swagger.io/v2/swagger.json')pet=awaitclient.pet.getPetById(petId=42).result(timeout=5)DocumentationMore documentation is available athttp://aiobravado.readthedocs.orgInstallation# To install aiobravado$pipinstallaiobravado# To install aiobravado with optional packages recommended by aiohttp$pipinstallaiobravado[aiohttp_extras]DevelopmentCode is documented usingSphinx.virtualenvis
recommended to keep dependencies and libraries isolated.Setup# Run teststox# Install git pre-commit hookstox-epre-commitinstallContributingFork it (http://github.com/sjaensch/aiobravado/fork)Create your feature branch (git checkout-bmy-new-feature)Add your modificationsAdd short summary of your modifications onchangelog.rstunderUpcoming release. Add that entry at the top of the file if it’s not there yet.Commit your changes (git commit-m"Add some feature")Push to the branch (git push originmy-new-feature)Create new Pull RequestLicenseCopyright (c) 2013, Digium, Inc. All rights reserved.
Copyright (c) 2014-2015, Yelp, Inc. All rights reserved.Aiobravado is licensed with aBSD 3-Clause License.
Package: aiobrawlstats
aiobrawlstats - Easy Async library for working with BrawlStars APIЧто нужно, чтобы пользоваться библиотекой:PyCharmBrawlStars TokenУстановка:pipinstall-Uaiobrawlstats
pipinstall-Uhttps://github.com/vladislavkovalskyi/aiobrawlstats/archive/master.zip
Package: aiobreaker
aiobreakeraiobreaker is a Python implementation of the Circuit Breaker pattern,
described in Michael T. Nygard's bookRelease It!_.Circuit breakers exist to allow one subsystem to fail without destroying
the entire system. This is done by wrapping dangerous operations
(typically integration points) with a component that can circumvent
calls when the system is not healthy.This project is a fork of pybreaker_ by Daniel Fernandes Martins that
replaces tornado with native asyncio, originally so I could practice
packaging and learn about that shiny newtypingpackage... _Release It!:https://pragprog.com/titles/mnee2/release-it-second-edition/.. _pybreaker:https://github.com/danielfm/pybreakerFeaturesConfigurable list of excluded exceptions (e.g. business exceptions)Configurable failure threshold and reset timeoutSupport for several event listeners per circuit breakerCan guard generator functionsFunctions and properties for easy monitoring and managementasynciosupportOptional redis backingSynchronous and asynchronous event listenersRequirementsAll you need ispython 3.6or higher.InstallationTo install, simply download from pypi:.. code:: bashpip install aiobreakerUsageThe first step is to create an instance ofCircuitBreakerfor each
integration point you want to protect against... code:: pythonfrom aiobreaker import CircuitBreaker

# Used in database integration points
db_breaker = CircuitBreaker(fail_max=5, reset_timeout=timedelta(seconds=60))

@db_breaker
async def outside_integration():
    """Hits the api"""
    ...At that point, go ahead and get familiar with the documentation.
Package: aiobroadlink
aiobroadlinkLibrary to control various Broadlink devices using asyncioThis software is based on the protocol description from Ipsum Domus (?)
Details athttps://blog.ipsumdomus.com/broadlink-smart-home-devices-complete-protocol-hack-bc0b4b397af1This software is based on python-broadlink by Matthew Garrett
Details athttps://github.com/mjg59/python-broadlinkRemote Control device seem to be working alright (both IR and RF)RM4C are now supported.
RM4 PRO are also supported.A1 device also work.Provisioning works.Other will be tested when I get the relevant hardware.Install with pip3. Be forewarned that aiobroadlink needs the 'cryptography' library.
This library will be automatically installed, but for this to succeed, you do need to
be able to compile things. To that effect you need a compiler and some header files. On
Debian/Ubuntu distributions, this means you need the packages 'libffi-dev' and 'libssl-dev'You can runaiobroadlinkorpython3 -m aiobroadlinkIf your IP address cannot be guessed, doaiobroadlink -i xxx.xxx.xxx.xxxwith xxx.xxx.xxx.xxx the IP address of the interface you want to use.When learning commands, they will be save in the file ~/.aiobroadlink.
Package: aiobrultech-serial
What is aiobrultech-serial?This library talks to devices fromBrultech Researchover their serial port, usingsiobrultech-protocolsto
decode the data.Installationpip install aiobrultech-serialUsagefromaiobrultech_serialimportconnectasyncwithconnect("/dev/ttyUSB0")asconnection:asyncforpacketinconnection.packets():print(f"{packet}")Look atscripts/dump.pyfor a fuller example.API CallsThis library also supports getting and setting information on the attached
device. It supports all of the API calls available insiobrultech-protocols.DevelopmentSetuppython3.11 -m venv .venv
source .venv/bin/activate

# Install Requirements
pip install -r requirements.txt

# Install Dev Requirements
pip install -r requirements-dev.txt

# One-Time Install of Commit Hooks
pre-commit installTestingTests are run withpytest.
Package: aiobservable
AIObservableA simple and efficient implementation of the observable pattern.IntroductionWhat sets it apart is that it doesn't represents events as a combination
of a name and arguments, but instead operates on classes.Instead of using names like "on_connect" the library encourages the use
of a "ConnectEvent" class which has the arguments as its attributes.
Instead of listening to a meaningless name observers instead use the
event type (the class). When emitting an event we then use instances of
the event class.Apart from other benefits this especially helps with typings and
eliminates the issue of having to know the function signature for each
event, as the only argument is the event instance.Using the built-indataclassesmakes
it easy to avoid writing boiler-plate code for each event.Exampleimportasyncioimportdataclassesimportaiobservable@dataclasses.dataclass()classConnectEvent:user_id:intuser_name:strasyncdefmain():observable=aiobservable.Observable()defon_connect(event:ConnectEvent)->None:print(f"{event.user_name}connected!")observable.on(ConnectEvent,on_connect)event=ConnectEvent(1,"Simon")# emit returns a future which resolves to None when all observers# are done handling the eventawaitobservable.emit(event)asyncio.run(main())InstallingYou can install the library fromPyPI:pipinstallaiobservable
Package: aiobsonrpc
aiobsonrpcbsonrpcfor asyncio.Python 3.5+Getting StartedInstallingpip install aiobsonrpcExampleServerimportasyncioimportaiobsonrpc@aiobsonrpc.service_classclassEchoService(object):@aiobsonrpc.aio_rpc_requestasyncdefecho(self,_,data):awaitasyncio.sleep(1)returndataasyncdefon_connected(reader,writer):aiobsonrpc.JSONRpc(reader,writer,services=EchoService())if__name__=='__main__':loop=asyncio.get_event_loop()server=asyncio.start_server(on_connected,'0.0.0.0',6789,loop=loop)loop.create_task(server)loop.run_forever()Clientimportasyncioimportaiobsonrpcasyncdefdo_connect():reader,writer=awaitasyncio.open_connection('localhost',6789,loop=loop)rpc=aiobsonrpc.JSONRpc(reader,writer)peer=rpc.get_peer_proxy(timeout=5)result=awaitpeer.echo(123)print(result)# 123if__name__=='__main__':loop=asyncio.get_event_loop()loop.run_until_complete(do_connect())
Package: aiobtclientapi
aiobtclientapiis an asynchronous API for communicating with BitTorrent
clients. It is a high-level wrapper aroundaiobtclientrpc.All client-specific details are abstracted away as much as possible, but the
individual quirks of each client can still be accessed if necessary.Documentation:https://aiobtclientapi.readthedocs.io/Repository:https://codeberg.org/plotski/aiobtclientapiPackage:https://pypi.org/project/aiobtclientapi/LicenseGPLv3+
Package: aiobtclientrpc
aiobtclientrpcprovides low-level access to the RPC protocols of BitTorrent
clients. It is supposed to be the basis for a high-level library. If you want to
use this directly, you need to read the documentation or source code of each
client.Check outaiobtclientapifor a high-level API.Documentation:https://aiobtclientrpc.readthedocs.io/Repository:https://codeberg.org/plotski/aiobtclientrpcPackage:https://pypi.org/project/aiobtclientrpc/FeaturesTunnel the client connection through a proxy (SOCKS5, SOCKS4, HTTP tunnel)Event handlers, e.g. when a torrent was added (Deluge only)(Re-)Connect automatically on any RPC method call and disconnect automatically
when used as a context managerKeep track of the connection status and provide changes to a callbackSupported BitTorrent ClientsDelugeqBittorrentTransmission(daemon)rTorrentLicenseGPLv3+