Saravanan666/pypi-org huggingface dataset:
Package: aioload
AIOloadhttps://blog.mogollon.com.ve/2020/01/10/load-testing-with-python/Load test tool usingaiosonichttp client. For drawing charts we
use matplotlib and pandas.Usage of uvloop is highly recommended.Requirementspython>=3.6Installationpipinstallaioload# optional, highly recommended, doesn't work on WindowspipinstalluvloopUsageyou need to specify your request in a settings file likeconfig.ini[http]sock_read=30sock_connect=3[test]# target url for testurl=http://localhost:8080/api/v1/something# methods: get, post, put, deletemethod=post## use body for send body in request# if body is json, indicate correct header in headers section# comment body line if you're doing a get requestbody='{"foo": "bar"}'# query params if needed, this will transform url# in something like http://localhost:8080/api/v1/something?token=something[params]token=something# headers if needed[headers]content-type=application/jsonusage example>aioload-husage:aioload[-h][-d][-v][-nNUMBER_OF_REQUESTS][-cCONCURRENCY][--plot]testfilepositionalarguments:testfileTestfiletobeexecutedoptionalarguments:-h,--helpshowthishelpmessageandexit-d,--debugtrueifpresent-v,--verbosetrueifpresent-nNUMBER_OF_REQUESTS,--number_of_requestsNUMBER_OF_REQUESTSnumberofrequeststobedone,default:100-cCONCURRENCY,--concurrencyCONCURRENCYconcurrency(requestsatthesametime),default:10--plotdrawchartsifpresent>aioloadconfig.ini-n3000-c100--plot-v2019-05-2917:20:51,662-__init__:135-info-8cf56ded860f41d8a86dab2aed05218f-startingscript...-2019-05-2917:20:55,301-__init__:102-info-8cf56ded860f41d8a86dab2aed05218f-done-min=14.54ms;max=212.21ms;mean=109.36ms;req/s=600.0;req/q_std=333.7;stdev=24.65;codes.200=3000;concurrency=100;requests=3000;You can override aioload runner methods,hereis an example. Then you should execute the script you made, in this example:python sample/dynamic_test.py conf.ini-vNotePython has limits, if your applications is crazy fast likethiscrystal server, the test will be limited by aiosonic’s client speed.Contributeforkcreate a branchfeature/your_featurecommit - push - pull requestDependencies are handled withpip-toolsthanks :)
Package: aiolog
Asynchronous handlers for standard python logging library.
Currently telegram (requiresaiohttp)
and smtp (viaaiosmtplib) handlers are available.Installationpip install aiologRepository:https://github.com/imbolc/aiologConfigurationJust use any way you prefer to configure built-inlogginglibrary, e.g.:logging.config.dictConfig({'version':1,'handlers':{'telegram':{# any built-in `logging.Handler` params'level':'DEBUG','class':'aiolog.telegram.Handler',# common `aiolog` params'timeout':10,# 60 by default'queue_size':100,# 1000 by default# handler specific params'token':'your telegram bot token','chat_id':'telegram chat id',},'smtp':{'level':'WARNING','class':'aiolog.smtp.Handler','hostname':'smtp.yandex.com','port':465,'sender':'bot@email','recipient':'your@email','use_tls':True,'username':'smtp username','password':'smtp password',},},'loggers':{'':{'handlers':['telegram','smtp',],'level':'DEBUG',},}})UsageYou can use built-inlogginglibrary as usual,
just add starting and stopping ofaiolog.log=logging.getLogger(__name__)asyncdefhello():log.debug('Hey')aiolog.start()loop=asyncio.get_event_loop()loop.run_until_complete(hello())loop.run_until_complete(aiolog.stop())Look at theexamplefolder for more examples.aiohttpWithaiohttp, you can use a little more sugar.
Instead of starting and stoppingaiologdirectly, you can use:aiolog.setup_aiohttp(app)
Package: aiologfields
aiologfieldsaiologfieldsmakes it easy to includecorrelation IDs, as well
as other contextual information into log messages, acrossawaitcalls andloop.create_task()calls.  Correlation IDs are critically
important for accurate telemetry in monitoring and debugging distributed
microservices.InstructionsIt couldn’t be easier:aiologfields.install()After this,every single taskcreated will have alogging_fieldsattribute. To add a field to aLogRecord, simply apply it to any task:t=loop.create_task(coro)t.logging_fields.correlation_id='12345'If you’re using a logging handler that produces JSON output
(likelogjson!), or some other formatter that produces output with
all fields in theLogRecord, you will find that each record within the
context of the task will include an additional field calledcorrelation_idwith a value of12345.DemoThis is adapted from one of the tests:aiologfields.install()correlation_id=str(uuid4())logger=logging.getLogger('blah')asyncdefcf2():logger.info('blah blah')asyncdefcf1():ct=asyncio.Task.current_task()ct.logging_fields.correlation_id=correlation_idawaitcf2()loop.run_until_complete(cf1())In theLogRecordproduced insidecf2(), an additional fieldcorrelation_idis included, even though the field was set in
coroutine functioncf1().It would also have worked ifcf2()had been executed in a separate
task itself, since thelogging_fieldsnamespace is copied between
nested tasks.
Package: aiologstash
asyncio logging handler for logstash.InstallationpipinstallaiologstashUsageimportloggingfromaiologstashimportcreate_tcp_handlerasyncdefinit_logger():handler=awaitcreate_tcp_handler('127.0.0.1',5000)root=logging.getLogger()root.setLevel(logging.DEBUG)root.addHandler(handler)ThanksThe library was donated byOcean S.A.Thanks to the company for contribution.
Package: aio-logstash
aio-logstashpython asyncio logstash logger adapterInstallationpipinstallaio-logstashUsageimportloggingimportasynciofromaio_logstash.handlerimportTCPHandlerasyncdefmain():handler=TCPHandler()awaithandler.connect('127.0.0.1',5000)logger=logging.getLogger(__name__)logger.setLevel(logging.INFO)logger.addHandler(handler)logger.info('test',extra={'foo':'bar'})awaithandler.exit()if__name__=='__main__':asyncio.run(main())
Package: aiologstash2
aiologstash2asyncio logging handler for logstash.Installationpipinstallaiologstash2Usageimportloggingfromaiologstash2importcreate_tcp_handlerasyncdefinit_logger():handler=awaitcreate_tcp_handler('127.0.0.1',5000)root=logging.getLogger()root.setLevel(logging.DEBUG)root.addHandler(handler)ThanksThis is an actively maintained fork ofaio-libs'
aiologstashThe library was donated byOcean S.A.Thanks to the company for contribution.
Package: aiologto
aiologtoUnofficial Asyncronous Python Client for LogtoLatest Version:FeaturesUnified Asyncronous and Syncronous Python Client forLogtoSupports Python 3.6+Strongly Typed withPydanticIncludes Function Wrappers to quickly add to existing projectsUtilizes Environment Variables for ConfigurationInstallation# Install from PyPIpipinstallaiologto# Install from sourcepipinstallgit+https://github.com/GrowthEngineAI/aiologto.gitUsageWIP - Simple Usage ExampleimportasynciofromaiologtoimportLogto,UserListResponsefromaiologto.utilsimportlogger"""Environment Vars that map to Logto.configure:all vars are prefixed with LOGTO_LOGTO_URL (url): str takes precedence over LOGTO_SCHEME | LOGTO_HOST | LOGTO_PORTLOGTO_SCHEME (scheme): str - defaults to 'http://'LOGTO_HOST (host): str - defaults to NoneLOGTO_PORT (port): int - defaults to 3000LOGTO_APP_ID (app_id): strLOGTO_APP_SECRET (app_secret): strLOGTO_RESOURCE (resource): str - defaults to "https://api.logto.io"LOGTO_OIDC_GRANT_TYPE (oidc_grant_Type): str - defaults to "client_credentials"## these variables are dynamically generated from the oidcLOGTO_ACCESS_TOKEN (access_token): str - defaults to NoneLOGTO_TOKEN_TYPE (token_type): str - defaults to NoneLOGTO_JWT_ALGORITHMS (jwt_algorithms): str - defaults to NoneLOGTO_JWT_OPTIONS (jwt_options): dict - defaults to {"verify_at_hash": False}LOGTO_JWT_ISSUER (jwt_issuer): str - defaults to generated valueLOGTO_TIMEOUT (timeout): int - defaults to 10LOGTO_IGNORE_ERRORS (ignore_errors): bool = defaults to False"""Logto.configure(url='...',app_id="...",app_secret="...",debug_enabled=True,)asyncdeffetch_users():# Fetch all the usersusers:UserListResponse=awaitLogto.users.async_list()logger.info(f"Users:{users}")# Update a specific useruser=users[0]user.custom_data["email"]="gexai@example.com"user=awaitLogto.users.async_update(user)logger.info(f"User Updated:{user.dict()}")asyncio.run(fetch_users())
Package: aioloki
aiolokiAn asynchronous python logging handler to stream logs to Grafana LokiInstallationpip install aiolokiUsageimportasyncioimportloggingimportaiohttpimportaiolokiasyncdefmain():session=aiohttp.ClientSession()handler=aioloki.AioLokiHandler('http://localhost:3100',tags={'cluser':'1'},session=session)log=logging.getLogger('test-logging')log.addHandler(handler)log.info('Setup aioloki successfully',extra={'tags':{'function':'main'}})awaitsession.close()asyncio.run(main())
Package: aiolotus
aiolotusUnofficial Asyncronous Python Client forLotusLatest Version:Official ClientInstallation# Install from PyPIpipinstallaiolotus# Install from sourcepipinstallgit+https://github.com/GrowthEngineAI/aiolotus.gitUsageWIP - Simple Usage ExampleimportasynciofromaiolotusimportLotusfromaiolotus.utilsimportloggerLotus.configure(apikey='...',url='',)asyncdefrun_test():res=awaitLotus.get_all_customers()logger.info(res)res=awaitLotus.get_all_metrics()logger.info(res)res=awaitLotus.get_all_plans()logger.info(res)res=awaitLotus.get_all_subscriptions()logger.info(res)awaitLotus.async_shutdown()asyncio.run(run_test())
Package: aiolxd
aiolxdWIP AsyncIO LXD API for Python 3.THIS PROJECT IS NOT READY FOR PRODUCTION USEExampleimportasynciofromaiolxdimportLXDasyncdefmain()->None:asyncwithLXD.with_async("https://localhost:8443",cert=("client.crt","client.key"))aslxd:create_task=awaitlxd.instance.create(name="test-instance",source="ubuntu/22.04",type_="virtual-machine")# Request the creation of an instanceawaitcreate_task.wait()# Wait for the task to completeprint(awaitlxd.instance.get("test-instance"))# architecture='x86_64' created_at='2023-02-07T13:05:12.631550731Z'# last_used_at='1970-01-01T00:00:00Z' location='none' name='test-instance'# profiles=['default'] project='default' restore=None stateful=False# status='Stopped' status_code=102 type='virtual-machine' description=''# devices={} ephemeral=False config=InstanceConfig(security_nesting=None)delete_task=awaitlxd.instance.delete("test-instance")# Request the deletion of an instanceawaitdelete_task.wait()# Wait for the task to completeasyncio.run(main())TODOBasic API (instance creation, deletion, etc.)LoggingWebsocket operation events (websocket support exists, but events are not parsed)TestsMore API endpoints
Package: aiolyric
# AIOLyricPython package for the Honeywell Lyric Platform.## Attributions / Contributions[@bramkragten](https://github.com/bramkragten) for the original implementation. Referenced his [package](https://github.com/bramkragten/python-lyric) quite a bit whilst writing this one.[@ludeeus](https://github.com/ludeeus) for his generator class. Made reading json into objects super simple. :tada:[Everyone else](https://github.com/timmo001/aiolyric/graphs/contributors). Thanks for the help!
Package: aiom3u8downloader
Update package m3u8downloader to use aiohttp to speed up download m3u8 urlSupport disguised as img (png/jpg/jpeg) to decode into ts fileaiom3u8downloader base on package m3u8downloader (https://pypi.org/project/m3u8downloader, version: 0.10.1)ffmpeg is used to convert the downloaded fragments into final mp4 video file.InstallationTo install aiom3u8downloader, simply:$sudoaptinstall-yffmpeg# python version >= python3.6$pipinstallaiom3u8downloaderQuick StartExample command line usage:aiodownloadm3u8-o~/Downloads/foo.mp4https://example.com/path/to/foo.m3u8If ~/.local/bin is not in $PATH, you can use full path:~/.local/bin/aiodownloadm3u8-o~/Downloads/foo.mp4https://example.com/path/to/foo.m3u8Here is built-in command line help:usage: aiom3u8downloader [-h] [--version] [--debug] --output OUTPUT
                           [--tempdir TEMPDIR] [--limit_conn LIMIT_CONN]
                           [--auto_rename] URL

download video at m3u8 url

positional arguments:
  URL                   the m3u8 url

optional arguments:
  -h, --help                  show this help message and exit
  --version                   show program's version number and exit
  --debug                     enable debug log
  --output OUTPUT, -o OUTPUT
                              output video filename, e.g. ~/Downloads/foo.mp4
  --tempdir TEMPDIR           temp dir, used to store .ts files before combing them into mp4
  --limit_conn LIMIT_CONN, -conn LIMIT_CONN
                              limit amount of simultaneously opened connections
  --auto_rename, -ar          auto rename when output file name already existsLimitationsThis tool only parses minimum m3u8 extensions for selecting media playlist
from master playlist, downloading key and fragments from media playlist. If a
m3u8 file doesn’t download correctly, it’s probably some new extension was
added to the HLS spec which this tool isn’t aware of.ChangeLogv0.0.1use aiohttp download m3u8 urlv1.0.3remove multiprocessing packagerelease to pypi
Package: aiomailru
aiomailruaiomailru is a pythonMail.Ru APIwrapper.
The main features are:authorization (Authorization Code,Implicit Flow,Password Grant,Refresh Token)REST APImethodsweb scrapersUsageTo useMail.Ru APIyou need a registered app andMail.Ruaccount.
For more details, seeaiomailru Documentation.Client applicationUseClientSessionwhen REST API is needed in:a client component of the client-server applicationa standalone mobile/desktop applicationi.e. when you embed your app’s info (private key) in publicly available code.fromaiomailruimportClientSession,APIsession=ClientSession(app_id,private_key,access_token,uid)api=API(session)events=awaitapi.stream.get()friends=awaitapi.friends.getOnline()Useaccess_tokenanduidthat were received after authorization. For more details, seeauthorization instruction.Server applicationUseServerSessionwhen REST API is needed in:a server component of the client-server applicationrequests from your serversfromaiomailruimportServerSession,APIsession=ServerSession(app_id,secret_key,access_token)api=API(session)events=awaitapi.stream.get()friends=awaitapi.friends.getOnline()Useaccess_tokenthat was received after authorization.
For more details, seeauthorization instruction.Installation$pipinstallaiomailruor$pythonsetup.pyinstallSupported Python VersionsPython 3.5, 3.6, 3.7 and 3.8 are supported.TestRun all tests.$pythonsetup.pytestRun tests with PyTest.$python-mpytest[-kTEST_NAME]Licenseaiomailru is released under the BSD 2-Clause License.
Package: aio_manager
.. image:: https://img.shields.io/pypi/v/aio_manager.svg:target: https://pypi.org/project/aio_manager.. image:: https://img.shields.io/travis/rrader/aio_manager/master.svg:target: http://travis-ci.org/rrader/aio_manager.. image:: https://img.shields.io/pypi/pyversions/aio_manager.svgScript manager for aiohttp.========Quick Start------------------Install from PYPI:.. code:: shellpip install aio_managerFor optional features, feel free to depend on extras:.. code:: shellpip install aio_manager[mysql,postgres]pip install aio_manager[sa]OR (less popular) via ``setup.py``:.. code:: shellpython -m setup installExample------------------.. code:: python:number-lines:app = build_application()manager = Manager(app)sqlalchemy.configure_manager(manager, app, Base,DATABASE_USERNAME,DATABASE_NAME,DATABASE_HOST,DATABASE_PASSWORD)
Package: aiomangadex
aiomangadexAn asynchronous API wrapper for mangadex.Basic Usageimportaiomangadeximportaiohttpimportasyncioasyncdeffetch(id):session=aiohttp.ClientSession()manga=awaitaiomangadex.fetch_manga(id,session)awaitsession.close()print(manga.description)asyncio.get_event_loop().run_until_complete(fetch(34198))For more info, visit the docshere.
Package: aiomangadexapi
Asynchronous MangaDex python APIAn unofficial asynchronous pythonMangaDexAPI built with the JSON API and web scraping.key featuresget data on any manga from mangadexget updates from mangadex main pageget the mangas from anyone's list with a rss linkget any chapter link from mangadexExamples#couple examplesimportaiomangadexapiimportasyncioasyncdefget_manga():session=awaitaiomangadexapi.login(username='username',password='password')# we login into mangadexmanga=awaitaiomangadexapi.search(session,'solo leveling')#search for solo leveling (will return the first result of the search on mangadex)awaitsession.close()#close the sessionreturnmangamanga=asyncio.run(get_manga())Documentationhttps://github.com/Mudy7/aiomangadexapi
Package: aio.manhole.server
Manhole server for theaioasyncio frameworkBuild statusInstallationRequires python >= 3.4Install with:pipinstallaio.manhole.serverQuick start - Manhole serverSave the following into a file “manhole.conf”[server/my_manhole_server]factory=aio.manhole.server.factoryport=7373Run with the aio run commandaiorun-cmanhole.confYou should now be able to telnet into the running server on port 7373aio.manhole.server usageConfigurationLets create a manhole configuration>>> config = """
... [aio]
... log_level = ERROR
...
... [server/server_name]
... factory = aio.manhole.server.factory
... port = 7373
...
... """>>> import sys
>>> import io
>>> import aiomanhole>>> import aio.testing
>>> import aio.app
>>> from aio.app.runner import runnerWhen we run the manhole server, its accessible as “server_name” from aio.app.servers>>> @aio.testing.run_forever(sleep=1)
... def run_manhole_server(config):
...     yield from runner(['run'], config_string=config)
...
...     def call_manhole():
...         print(aio.app.servers["server_name"])
...         aio.app.clear()
...
...     return call_manhole>>> run_manhole_server(config)
<Server sockets=[<socket.socket ...laddr=('0.0.0.0', 7373)...>Lets try calling the manhole server>>> import asyncio
>>> import telnetlib3>>> @aio.testing.run_forever(sleep=1)
... def run_manhole_server(config):
...     yield from runner(['run'], config_string=config)
...
...     class TestTelnetClient(telnetlib3.TelnetClient):
...
...         def data_received(self, data):
...             print(data)
...
...     def call_manhole():
...         loop = asyncio.get_event_loop()
...         transport, protocol = yield from loop.create_connection(
...             TestTelnetClient, "127.0.0.1", 7373)
...         aio.app.clear()
...
...     return call_manhole>>> run_manhole_server(config)
b'hello...\n>>> '
Package: aio-marantz-avr
AsyncIO Marantz AVRAsyncIO access to Marantz AVRs.Free software: MIT licenseDocumentation:https://aio-marantz-avr.readthedocs.io.FeaturesControl and read status of a Marantz AVR over Telnet using python AsyncIO.Command line tool.Supported models:SR7011 (tested)AV7703SR6011SR5011NR1607CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.HistoryAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog, and this project adheres toSemantic Versioning.0.1.0 (2020-01-07)First release on PyPI.AddedBasic control of limited Marantz AVR models.
Package: aiomarionette
FireFox Marionette Client forasyncioaiomarionetteprovides an asynchronous client interface for theFirefox
Marionetteremote control protocol.UsageTo useaiomarionette, create an instance of theMarionetteclass.  By
default, the cclient will attempt to connect to the Marionette socket on the
local machine, port 2828.  You can specify thehostand/orportarguments to
change this.  Be sure to call theconnectmethod first, before calling any
of the command methods.asyncwithaiomarionette.Marionette()asmn:mn.connect()mn.navigate('https://getfirefox.com/')Compared tomarionette_driverThe official Python client for Firefox Marionette ismarionette_driver.
Although it is more complete thanaiomarionette(at least for now), it only
provides a blocking API.Unlikemarionette_driver,aiomarionettedoes not currently support launching
Firefox directly.  You must explicity start a Firefox process in Marionette mode
before connecting to it withaiomarionette.
Package: aiomc
aiomcForked frombmcaiomc is an Async Python 3 wrapper library for MinIO's command line interfacemcandminio.MinIO, an Amazon Simple Storage Service (S3) compatible object storage. It has a usefulPython client librarywhich unfortunately lacks administrative capabilities that themcandminiocommand line interfaces provide, such as adding users and hosts, which we need to do for theikomachine learning platform. This library solves thatproblem.Installationpipinstallaiomc
Package: aiomcache
memcached client for asyncioasyncio (PEP 3156) library to work with memcached.Getting startedThe API looks very similar to the other memcache clients:importasyncioimportaiomcacheasyncdefhello_aiomcache():mc=aiomcache.Client("127.0.0.1",11211)awaitmc.set(b"some_key",b"Some value")value=awaitmc.get(b"some_key")print(value)values=awaitmc.multi_get(b"some_key",b"other_key")print(values)awaitmc.delete(b"another_key")asyncio.run(hello_aiomcache())Version 0.8 introducesFlagClientwhich allows registering callbacks to
set or process flags.  Seeexamples/simple_with_flag_handler.pyCHANGES0.8.1 (2023-02-10)Addconn_argstoClientto allow TLS and other options when connecting to memcache.0.8.0 (2022-12-11)AddFlagClientto support memcached flags.Fix type annotations for@acquire.Fix rare exception caused by memcached server dying in middle of operation.Fix get method to not use CAS.0.7.0 (2022-01-20)Added support for Python 3.10Added support for non-ascii keysAdded type annotations0.6.0 (2017-12-03)Drop python 3.3 support0.5.2 (2017-05-27)Fix issue with pool concurrency and task cancellation0.5.1 (2017-03-08)Added MANIFEST.in0.5.0 (2017-02-08)Added gets and cas commands0.4.0 (2016-09-26)Make max_size strict #140.3.0 (2016-03-11)Dockerize testsReuse memcached connections in Client Pool #4Fix stats parse to compatible more mc class software #50.2 (2015-12-15)Make the library Python 3.5 compatible0.1 (2014-06-18)Initial release
Package: aio-mc-rcon
Aio-MC-RCONAn asynchronous RCON client/wrapper written in Python for Minecraft Java Edition servers!Installationpip install -U aio-mc-rconExample UsageSee theexamples folder.Documentationclassaiomcrcon.Client(host:str, port:int, password:str):Arguments:host: str-The hostname / ip of the server to connect to.port: int-The port of the server to connect to.password: str-The password to connect, can be found as the value underrcon.passwordin theserver.propertiesfile.Methods:connect(timeout: int = 2)-wheretimeouthas a default value of 2 seconds.send_cmd(cmd: str, timeout: int = 2)-wherecmdis the command to be executed on the server and timeout has a default value of 2 seconds.close()-closes the connection between the client and server.exceptionaiomcrcon.RCONConnectionErrorRaised when the connection to the server fails.exceptionaiomcrcon.IncorrectPasswordErrorRaised when the provided password/authentication is invalid.exceptionaiomcrcon.ClientNotConnectedErrorRaised when the connect() method hasn't been called yet, and commands cannot be sent.