Saravanan666/pypi-org huggingface dataset:
Package: aio.signals
aio.signalsPubsub system for theaioasyncio frameworkBuild statusInstallationRequires python >= 3.4Install with:pipinstallaio.signalsQuickstartThe listen function is called synchronously, but the callback listener will be called as a coroutine if it isnt oneThe callback listener receives a signal object that has the name of the signal and the object that the signal was emitted withThe emit function is a coroutineAdd the following code to a file my_signals.pyimportasynciofromaio.signalsimportSignalsdeflistener(signal):yield fromasyncio.sleep(1)print(signal.data)signals=Signals()signals.listen("my-signal",listener)loop=asyncio.get_event_loop()loop.run_until_complete(signals.emit("my-signal",'BOOM!'))Run withpythonmy_signals.pyaio.signals usageUsing>>> import asyncio
>>> import aio.testing
>>> from aio.signals import SignalsThe handler receives a signal objectsignal.name is the name of the signalsignal.data contains the emitted object>>> @asyncio.coroutine
... def callback(signal):
...     print("%s received with %s" % (signal.name, signal.data))>>> @aio.testing.run_until_complete
... def run_test(_signals, name, message):
...     yield from _signals.emit(name, message)>>> signals = Signals()
>>> signals.listen("test-signal", callback)>>> run_test(signals, "test-signal", 'BOOM!')
test-signal received with BOOM!The handler is wrapped in a co-routine if its not one already>>> def callback(signal):
...     yield from asyncio.sleep(1)
...     print("%s received with %s" % (signal.name, signal.data))>>> signals = Signals()
>>> signals.listen("test-signal-2", callback)>>> run_test(signals, "test-signal-2", 'BOOM AGAIN!')
test-signal-2 received with BOOM AGAIN!
Package: aiosip
SIP support for AsyncIO written in pure Python.Warning: SIP knowledge is necessary to use this library.Seeexamples/folder for examples.Free software: Apache2 licenseFeatures tested on productionSIP endpoint client modeSIP proxy/server modeUDP and TCP supportREGISTERNOTIFYSUBSCRIBEMESSAGEMissing featuresDocumentationunit testsSDP supportHistory0.2.0 (2017-09-14)A lot of bugs fixesProxy supportaiohttp dependency removed in favor of multidictCode refactoringSpecial thanks to Simon Gomizelj (vodik) on this release: almost come from his contributions0.1.0 (2014-12-28)First release on PyPI.
Package: aiositi-mex
siti-pythonCliente para enviar reportes a la CNBV por medio de la plataforma SITI
Documentación:https://sitiapiqa.cnbv.gob.mx/devportal/apis/La manera sugerida para llenar reportes es por medio de diccionarios con el formato del modelo:Desde diccionariosfromsiti.resources.ifpeimportReporte111dict_111={'identificador_reporte':{'inicio_periodo':dt.date(2019,1,1),'fin_periodo':dt.date(2019,1,31),'clave_institucion':'065000','reporte':'111',},'informacion_financiera':[{'concepto':'100000000000','moneda':'2','dato':334422.0434,},]}r111=Reporte111(**dict_111)In[1]:r111Out[1]:Reporte111(folio=None,identificador_reporte=IdentificadorReporte(inicio_periodo=datetime.date(2019,1,1),fin_periodo=datetime.date(2019,1,31),clave_institucion='065000',reporte='111'),informacion_financiera=[InformacionFinanciera(concepto='100000000000',moneda='2',dato=334422.0434)])Donde r111 será el reporte construido con el modelo, y se realizarán las validaciones propias de ese reporte.Desde dataframeDe igual manera se puede construir el objto con la utilización de un dataframe de Pandas con un formato que siga las columnas del modelo que se quiere construir.
Para obtener las columnas del modelo se puede mandar a llamar el método.columns()In[13]:Reporte111.columns()Out[13]:{'inicio_periodo':str,'fin_periodo':str,'clave_institucion':str,'reporte':str,'concepto':str,'moneda':str,'dato':float}Se puede construir un dataframe con esta información y posteriormente mandar a llamar el método .from_dataframe(name, df), dónde name es el nombre del archivo que tiene que cumplir con el formatoCLAVEINSTITUCION_REPORTE_FECHAINICIO_FECHAFINALejemplo:065014_2610_20210831_20210831para obtener los datos del campoidentificador_reporte.importpandasaspdname='065014_2610_20210831_20210831.csv'columns=Reporte111.columns()df=pd.read_csv(name,dtype=columns)r111=Reporte111.from_dataframe(name,df)In[1]:r111Out[1]:Reporte111(folio=None,identificador_reporte=IdentificadorReporte(inicio_periodo=datetime.date(2019,1,1),fin_periodo=datetime.date(2019,1,31),clave_institucion='065000',reporte='111'),informacion_financiera=[InformacionFinanciera(concepto='100000000000',moneda='2',dato=334422.0434)])EnviarAl mandar a llamar cualquiera de los métodos de enviar (send,resend,update), el cliente automáticamente convertirá el objeto al formato solicitado por la CNBV. Este formato se puede obtener llamando el método .dict(to_camel_case=True).Estos métodos regresarán un folio, el cual es importante almacenar para poder realizar el seguimiento del envíoIn[1]:r111.dict(to_camel_case=True)Out[1]:{'identificadorReporte':{'inicioPeriodo':'20190101','finPeriodo':'20190131','claveInstitucion':'065000','reporte':'111'},'informacionFinanciera':[{'concepto':'100000000000','moneda':'2','dato':334422.0434}]}
Package: aioskybell
aioskybellPython API client for Skybell Doorbells.Installationpython3-mpipinstallaioskybellExample usageMore examples can be found in thetestsdirectory."""Example usage of aioskybell."""importasynciofromaioskybellimportSkybellasyncdefasync_example():"""Example usage of aioskybell."""asyncwithSkybell(username="user",password="password")asclient:print(awaitclient.async_initialize())asyncio.get_event_loop().run_until_complete(async_example())ContributeAllcontributions are welcome!Fork the repositoryClone the repository locally and open the devcontainer or use GitHub codespacesDo your changesLint the files withmake lintEnsure all tests passes withmake testEnsure 100% coverage withmake coverageCommit your work, and push it to GitHubCreate a PR against themasterbranch
Package: aioskynet
aioskynetAn async wrapper of the Sia Skynet API.Basic usageUploading a filefromasyncioimportrunfromaioskynetimportSkynetClient,Fileclient=SkynetClient()asyncdefmain():file=File("test.py",open("test.py"))data=awaitclient.upload_file(file)print(data)# Instance of aioskynet.SkynetResponse# Close the client when finished.awaitclient.close()run(main())
Package: aioslacker
info:slacker wrapper for asyncioInstallationpipinstallaioslackerUsageimportasynciofromaioslackerimportSlackerTOKEN='xxxxx'asyncdefgo():asyncwithSlacker(TOKEN)asslack:awaitslack.chat.post_message('#general','Hello fellow slackers!')loop=asyncio.get_event_loop()loop.run_until_complete(go())loop.close()ThanksThe library was donated byOcean S.A.Thanks to the company for contribution.
Package: aios-lib
AIOS LIBLibrary for AIOS programBuildpython3setup.pysdistbdist_wheelIntallationpip3installwheel_file_pathUsagefromaios-lib.utilsimport*# Obtain data directory from environment variablesdata_dir=get_data_dir()# Obtain model directory from environment variablesmodel_dir=get_model_dir()# Report model score to clustar aios serverscore=1report_score(score)Acknowledge
Package: aioslsk
aioslsk is a Python library for the SoulSeek protocol built on top of asyncio.Supported Python versions are currently 3.8 - 3.12You can find the full documentationhereInstallationpipinstallaioslskQuick StartStarting the client and sending a private message:importasynciofromaioslsk.clientimportSoulSeekClientfromaioslsk.commandsimportPrivateMessageCommandfromaioslsk.settingsimportSettings,CredentialsSettings# Create default settings and configure credentialssettings:Settings=Settings(credentials=CredentialsSettings(username='my_user',password='Secret123'))asyncdefmain():client:SoulSeekClient=SoulSeekClient(settings)awaitclient.start()awaitclient.login()# Send a private messageawaitclient.execute(PrivateMessageCommand('my_friend','Hi!'))awaitclient.stop()asyncio.run(main())DevelopmentInstallpoetryand setup the project dependencies by running:poetryinstallA tool is available to start the client for debugging purposes (try out commands to the server, …):Create asettings.jsonfile containing valid credentials in thetools/debug/directory (or pass a path using--settings)Runpoetry run python-mtools.debug.debug_modeto start the REPLRun an example command:>>> awaitclient(cmds.GetPeerAddressCommand('someuser'),response=True)To close the REPL executeexit()or pressCtrl+ZOptionally the script takes a--cache-dirthat will read/write the transfer and shares cache from the given directoryDependenciesThe package uses several dependencies:mutagen: library used for extracting audio metadataaiofiles: asyncio library for filesystem managementasync-upnp-client: library for managing UPnP configurationpydantic-settings: library for managing settingsasync-timeout: library providing timeout classBuilding the documentationcddocs/poetryrunmakehtmlRunning TestsRunning all tests:poetryrunpytesttests/Running all tests with code coverage report:poetryrunpytest--cov=aioslsk--cov-reportterm-missingtests/Running the mock server:poetryrunpython-mtests.e2e.mock.serverpoetryrunpython-mtests.e2e.mock.server--port12345
Package: aioslurm
aioslurmDocumentation:https://aioslurm.gitlab.io/aioslurm/Development environmentDocker (compose) is used both for development and for GitLab CI to ensure a
consistent environment.Get started by cloning the repository and work on thedevelopmentbranch:gitclonegit@gitlab.com:aioslurm/aioslurm.gitcdaioslurmBuild servicesdockerandfabric(v2+) should be installed and available locally to
build/run the containers. On Ubuntu 22.04+, you can install these with:sudoaptinstalldockerfabricTo build the docker containers:fabbuildDevelopment and testingRemember to run the tests locally when developing to catch failures before CI
is run on push to the repo.Run tests:fabtoxOther commandsGenerate docs:fabdocsPython shell:fabshellBash shell:fabbash
Package: aiosm
asyncio socket managerClasses extending the Client class can overload the run function to connect, subscribe and run a loop in parallelasync def run(self):
    await self.connect()
    await self.request("subscribe", "clinet1")
    await asyncio.gather(
        super().run(),
        self.loop()
    )A loop function can deal with outgoing communication as long as it periodically calls self.waitasync def loop(self):
    asyncio.current_task().set_name(self.__name__ + "-Transmitter")
    while True:
        #
        await self.wait()To expose functions to RPC calling, add their name to the white_list_functions list.
To call a function running on a serer node, use self.request():await self.request("<name of function>", *args)To call a function running on another client, use self.broadcast():await self.request("<subscription tag>", "<name of function>", *args)To subscribe to a new tag, call the subscribe function:await self.request("subscribe", "clinet1")
Package: aiosmartpost
aiosmartpost - Itella SmartPost API wrapper for humans 📦WORK IN PROGRESS! NOT READY FOR PRODUCTION USEOfficial SmartPost API DocsThis solution:has both async and sync APIhas 100% type-annotated codeis tested in real-world project in EstoniaQuickstartExamples use async version ofClient, but you can use import below instead and removeawaitkeywords:fromsmartpost.syncimportClientFetch list of available Estonian destinations:>>>fromsmartpostimportClient>>>client=Client("user","pass")# credentials can be omitted in this case>>>awaitclient.get_ee_terminals()[Destination(place_id=101,name='Viljandi Männimäe Selver',...),...]Add new shipment order and get A5 PDF with label for it:>>>fromsmartpostimportClient>>>fromsmartpost.errorsimportShipmentOrderError>>>fromsmartpost.modelsimportRecipient,EETerminalDestination,ShipmentOrder>>>client=Client("user","pass")>>>recipient=Recipient("John Doe","+37255555555","john.doe@example.com")>>>terminal=EETerminalDestination(102)>>>order_id=547>>>order=ShipmentOrder(recipient,terminal,reference=str(order_id))>>>try:>>>orders_info=awaitclient.add_shipment_orders([order])>>>exceptShipmentOrderErrorasexc:>>>print("Failed to add shipment order:")>>>forerror_detailsinexc.errors:>>>print(f"Order #{error_details['reference']}error:{str(error_details)}")>>>>>>orders_info[OrderInfo(barcode='XXXXXXXXXXXXXXXX',reference=None,sender=None,doorcode=None)]>>>pdf_bytes=awaitclient.get_labels_pdf("A5",[orders_info[0].barcode])>>>withopen("/tmp/test.pdf","wb")asfile:...file.write(pdf_bytes)...57226
Package: aiosmf
aiosmfsmf rpc implementation for asyncio --https://aiosmf.readthedocs.orgThesmf projectis a high-performance rpc
platform built using the c++Seastarframework. This project is a Python asyncio implementation of the rpc protocol
used by smf. There are alsoGoandJavaimplementations.Note that current support in aiosmf is limited to client implementations.
Servers are written in C++, Go, or Java. Adding a Python server framework is
future work.Please seehttps://aiosmf.readthedocs.orgfor instructions on getting started.
Package: aiosmshub
Installation | УстановкаWindowspip install aiosmshubLinuxpip3 install aiosmshubInformation | ИнформацияENG: The current version of aiosmshub is 0.3.0
RU: Актуальная версия aiosmshub 0.3.0
Пока идет разработка, поэтому ничего нет :(
Package: aiosmsru
🚧 aioSMSruSend SMSCheck SMS statusGet SMS costGet balanceGet limitGet free limitGet my sendersCheck api_id or login and passwordAdd to stoplistRemove from stoplistGet stoplistAdd callbackRemove callbackGet callbacksCallcheck🧑‍💻 How to useI gave an example for an async client, but sync is no different,
you just don't need to use await. Get satisfaction 😌fromsmsruimportAioSMSru,SMSruclient=AioSMSru("app_id")asyncdefmain():print(awaitclient.sms_cost("79991398805","I'm in serious shit"))# 79991398805 and 79956896018 <- I feel totally lostscend=awaitclient.send_sms(recipients=['79991398805','79956896018'],messages="I feel totally lost")print(awaitclient.check_sms([m_idform_idinsensed.sms.keys()]))# 79991398805 <- If i'm asking for help# 79956896018 <- it's only becausescend=awaitclient.send_sms(recipients=['79991398805','79956896018'],messages=["If i'm asking for help","it's only because"])call=awaitclient.callcheck('79991398805')print(call.code==input("Last 4 digits of incoming call number: "))
Package: aiosmtpd
This is a server for SMTP and related MTA protocols,
similar in utility to the standard library’ssmtpd.pymodule,
but rewritten to be based onasynciofor Python 3.7+.Please visit theProject Homepagefor more information.Signing KeysStarting version 1.3.1,
files provided through PyPI orGitHub Releaseswill be signed using one of the following GPG Keys:GPG Key IDOwner / EmailKey5D60 CE28 9CD7 C258Pandu POLUAN /pepoluan at gmail period comOn GitHub5555 A6A6 7AE1 DC91Pandu E POLUANpepoluan at gmail period comE309 FD82 73BD 8465Wayne Wernerwaynejwerner at gmail period com
Package: aiosmtplib
aiosmtplib is an asynchronous SMTP client for use with asyncio.For documentation, seeRead The Docs.Quickstartimportasynciofromemail.messageimportEmailMessageimportaiosmtplibmessage=EmailMessage()message["From"]="root@localhost"message["To"]="somebody@example.com"message["Subject"]="Hello World!"message.set_content("Sent via aiosmtplib")asyncio.run(aiosmtplib.send(message,hostname="127.0.0.1",port=25))RequirementsPython 3.8+ is required.Bug ReportingBug reports (and feature requests) are welcome viaGithub issues.
Package: aiosnmp
aiosnmp is an asynchronous SNMP client for use with asyncio.InstallationpipinstallaiosnmpDocumentationhttps://aiosnmp.readthedocs.io/en/latest/api.htmlNoticeOnly snmp v2c supported, v3 version is not supportedOids should be like.1.3.6...or1.3.6....iso.3.6...is not supportedSource address (host and port) validationBy default, v2c should not validate source addr, but in this library, it is enabled by default.
You can disable validation by passingvalidate_source_addr=FalsetoSnmp.Basic Usageimportasyncioimportaiosnmpasyncdefmain():asyncwithaiosnmp.Snmp(host="127.0.0.1",port=161,community="public")assnmp:forresinawaitsnmp.get(".1.3.6.1.2.1.1.1.0"):print(res.oid,res.value)asyncio.run(main())more in/examplesTODOsnmp v3 supportmore testsLicenseaiosnmp is developed and distributed under the MIT license.Run local testspipinstall-rrequirements-dev.txttoxBefore submitting PRpipinstall-rrequirements-dev.txttox-eformat
Package: aiosnow
aiosnow: Asynchronous Python ServiceNow Libraryaiosnowis a Pythonasynciolibrary for interacting with ServiceNow programmatically. It hopes to be:Convenient: A good deal of work is put into making the library flexible and easy to use.Performant: Uses non-blocking I/O to allow large amounts of API request tasks to run concurrently while being friendly on system resources.Modular: Core functionality is componentized into modules that are built with composability and extensibility in mind.Example codeimportasyncioimportaiosnowfromaiosnow.models.table.declaredimportIncidentModelasIncidentasyncdefmain():client=aiosnow.Client("<instance>.service-now.com",basic_auth=("<username>","<password>"))asyncwithIncident(client,table_name="incident")asinc:# Fetch high-priority incidentsforresponseinawaitinc.get(Incident.priority<=3,limit=5):print(f"Number:{response['number']}, Priority:{response['priority'].value}")asyncio.run(main())Check out theexamples directoryfor more material.DocumentationAPI reference and more is available in thetechnical documentation.FundingTheaiosnowcode is permissively licensed, and can be incorporated into any type of application–commercial or otherwise–without costs or limitations.
Its author believes it's in the commercial best-interest for users of the project to invest in its ongoing development.Consider leaving adonationif you like this software, it will:Directly contribute to faster releases, more features, and higher quality software.Allow more time to be invested in documentation, issue triage, and community support.Safeguard the future development ofaiosnow.Development statusBeta: Core functionality is done and API breakage unlikely to happen.ContributingCheck out thecontributing guidelinesif you want to help out with code or documentation.AuthorRobert Wikman <rbw@vault13.org>
Package: aio-snowplow-tracker
OverviewThis is a fork of to the officialSnowplow Python Trackerthat leveragesasynciofor high-performance event tracking.With this tracker you can collect event data from your Python-based applications, games or Python web servers/frameworks.Examplefromaio_snowplow_trackerimportTracker,Emitter,Subjectimportasyncioasyncdefmain():e=Emitter('d3rkrsqld9gmqf.cloudfront.net')s=Subject().set_user_id('5432')t=Tracker(e,subject=s,app_id='example-app')awaitt.track_page_view('http://example.com','Title')asyncio.run(main())InstallationTo install the Snowplow Python Tracker locally, assuming you already have Pip installed:$pipinstallaio-snowplow-tracker--upgradeTo install the Snowplow Tracker with extras:# Redis extra$pipinstallaio-snowplow-tracker[redis]# Celery extra$pipinstallaio-snowplow-tracker[celery]Find out moreThe official Snowplow Python Tracker documentation is applicable to this library as well, with some minor changes:import aio_snowplow_trackerinstead ofimport snowplow_tracker.awaitTracker calls.Technical DocsContributingTechnical DocsContributingMaintainer QuickstartAssumingpyenvis installedhost$ git clone git@github.com:snowplow/snowplow-python-tracker.git
host$ cd snowplow-python-tracker
host$ pyenv install 3.7.11 && pyenv install 3.8.11 && pyenv install 3.9.6
host$ ./run-tests.sh deploy
host$ ./run-tests.sh testCopyright and licenseThe Snowplow Python Tracker is copyright 2013-2021 Snowplow Analytics Ltd.Licensed under theApache License, Version 2.0(the “License”);
you may not use this software except in compliance with the License.Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: aiosocketpool
aiosocketpoolAn asyncio-compatible socket pool. Simple, compact, easily extended.If your application needs to connect to many remote hosts simultaneously (and often), it probably
makes sense to keep connections open and re-use them rather than establishing a new connection for
every request. Combining anasyncioevent loop and a socket pool might be the way to go!Based onsocketpool.Requires Python 3.7 or above.ExamplesRun a simple TCP echo server in a background thread, using theasynciolibrary.importasyncioimportthreading# start a new event loop running in a background threaddefrun_loop_forever(loop):loop.run_forever()loop=asyncio.new_event_loop()t=threading.Thread(name="BackgroundEventLoop",target=run_loop_forever,args=[loop],daemon=True)t.start()# run a tcp echo server using asyncio in the background event loopasyncdefecho_handler(reader,writer):writer.write(awaitreader.read(32))awaitwriter.drain()writer.close()asyncdefecho_server(tcp_port):server=awaitasyncio.start_server(echo_handler,"127.0.0.1",tcp_port)awaitserver.serve_forever()asyncio.run_coroutine_threadsafe(echo_server(12345),loop)Create a new TCP connection pool in the main thread, get a connection, and send and receive data.fromaiosocketpoolimportAsyncConnectionPool,AsyncTcpConnectorpool=AsyncConnectionPool(factory=AsyncTcpConnector,reap_connections=True,# a background task will destroy old and idle connectionsmax_lifetime=10,# connections will remain idle at most 10 secondsmax_size=10,# we will maintain at most 10 idle connections in the pool)asyncdefhello_world():asyncwithpool.connection(host="127.0.0.1",port=12345)asconn:awaitconn.sendall(b"hello world")print(awaitconn.recv(32))awaithello_world()Create a bunch of connections and run them all concurrently.loop=asyncio.get_event_loop()tasks=[]for_inrange(25):tasks.append(loop.create_task(hello_world()))loop.run_until_complete(asyncio.gather(*tasks))
Package: aiosocketproto
Async Socket ProtocolJust Simple and Universal socket protocol written in Python.After writing the socket protocol class for the tenth time, I wanted to make a universal package for all my projects. I will be glad to support and advice!FeaturesClient sideServer sideSafeKepp AlivecontrolDefault serializer works withint, float, str, bytes, bytearray, list, dict, tuple, settypesAbility to easily add your own serializersHow To InstallJust use pip from your command line:pip install aiosocketprotoHow To UseCreate serverimport asyncio
import aiosocketproto


async def connection(socket: aiosocketproto.AsyncSocketClient):
    print('Client connected!')
    await server.receive()
    await server.send(data='example str data')


async def create_server():
    server = await aiosocketproto.start_server([9999], connection)
    await server.idle() # keep alive


asyncio.run(create_server())In this case, the server will be launched at0.0.0.0:9999You can pass a range of ports (example:range(8888, 9999)), and the server will choose the first available one.Connect as clientimport asyncio
import aiosocketproto


async def connect():
    server = await aiosocketproto.connect('127.0.0.1', 9999)
    await server.send(data=[123, 'abc', b'somebytes'], second_arg=0.123)
    await server.receive()


asyncio.run(connect())Full example with custom serializers see inexample.py