Saravanan666/pypi-org huggingface dataset:
Package: aionextpay
AioNextPayThis is an async library for requesting to thehttps://nextpay.orgpurchase gateway.How to install :pip install aionextpayHow to use :First importNextPayfromaionextpayfrom aionextpay import NextPayThen you need to create an instance from NextPay class and pass it's parameters to it  in an async functionfrom aionextpay import NextPay


token = 'your_nextpay_token'
callback_uri = 'yourdomain.ir/verify'

async def func():
    amount = '10000' # price of your product
    nextpay = NextPay(token, amount, callback_uri)Then you need to use purchase functionfrom aionextpay import NextPay


token = 'your_nextpay_token'
callback_uri = 'yourdomain.ir/verify'

async def func():
    amount = '10000' # price of your product
    nextpay = NextPay(token, amount, callback_uri)
    trans_id = await nextpay.purchase(order_id)Have in mind thatpurchasefunction take kwargs parameter. so read the docs.If every thing goes good you get a trans_id from that function.p.s : you have to create a gateway payment with that trans_id and give it to the client like this:from aionextpay import NextPay


token = 'your_nextpay_token'
callback_uri = 'yourdomain.ir/verify'

async def func():
    amount = '10000' # price of your product
    nextpay = NextPay(token, amount, callback_uri)
    trans_id = await nextpay.purchase(order_id)
    link = f"https://nextpay.org/nx/gateway/payment/{trans_id}"When your client complete the purchase nextpay will request to the address you gave tocallback_urivariableWhen it does verify the purchase in your request handler like this :await nextpay.verify(trans_id)If everything goes good it will return True otherwise an exception will raiseYou can also refund the payment like this :await nextpay.refund(trans_id)If everything goes good it will return True otherwise an exception will raise
Package: aionic
The package is the async library for the API of Russian DNS registrator
Ru-Center (a.k.a. NIC.RU). It provides classes for managing DNS services,
zones and records.This project bases on:https://github.com/andr1an/nic-apiInstallationUsingpip:pip install aionicUsageInitializationTo start using the API, you should get a pair of OAuth application login and
password from NIC.RU. Here is the registration page:https://www.nic.ru/manager/oauth.cgi?step=oauth.app_registerimportasynciofromnic_apiimportNICApidefprint_token(token:dict):print("Token:",token)api=NICApi(client_id="---",client_secret="---",username="---/NIC-D",password="---",scope="GET:/dns-master/.+",token_updater=print_token)# First you need to get tokenasyncdefmain():awaitapi.get_token()asyncio.run(main)Get tokenCall theget_token()method:# First you need to get tokenasyncdefmain():awaitapi.get_token()asyncio.run(main)Now you are ready to use the API.A token can be saved anywhere, for example, to a file, using the callback:token_updater. It also could be used for authorization.
Neither password nor username is required as long as the token is valid.Viewing services and DNS zonesOnnic.ruDNS zones are located in “services”:api.services()Usually there is one service per account. Let’s view available zones in the
serviceMY_SERVICE:asyncdefmain():awaitapi.zones('MY_SERVICE')asyncio.run(main)When starting a modification make sure that there is no any uncommited
changes in the zone, cause they would be applied on commit.Getting DNS recordsOne has to specify both service and DNS zone name to view or modify a record:asyncdefmain():awaitapi.records('MY_SERIVCE','example.com')asyncio.run(main)Creating a recordTo add a record, create an instance of one of thenic_api.models.DNSRecordsubclasses, i.e.ARecord:importaionic.modelsasnic_modelsrecord_www=nic_models.ARecord(name='www',a='8.8.8.8',ttl=3600)Add this record to the zone and commit the changes:asyncdefmain():awaitapi.add_record(record_www,'MY_SERVICE','example.com')awaitapi.commit('MY_SERVICE','example.com')asyncio.run(main)Deleting a recordEvery record in the zone has an unique ID, and it’s accessible viaDNSRecord.idproperty. When you got the ID, pass it to thedelete_recordmethod:asyncdefmain():awaitapi.delete_record(10,'MY_SERVICE','example.com')awaitapi.commit('MY_SERVICE','example.com')asyncio.run(main)Do not forget to always commit the changes!
Package: aionlib
aionlib- library support foraionIntroductionInstallationTodoLicenseIntroductionaionlibis the official library support for theaionInstallationTo installaionlibwith pip3, type:sudo pip3 install aionlibIf you want to installaionlibfrom github, type:sudo git clone https://github.com/blueShard-dev/aionlib
cd aionlib
sudo python3 setup.py installTodotutorial for all classes / functionsLicenseThis project is licensed under the Mozilla Public Licence 2.0 (MPL-2.0) License - see theLICENSEfile for more details
Package: aionostr
aionostrasyncio nostr clientFree software: BSD licenseDocumentation:https://aionostr.readthedocs.io.FeaturesRetrieve anything from the nostr network, using one command:$aionostrgetnprofile1qqsv0knzz56gtm8mrdjhjtreecl7dl8xa47caafkevfp67svwvhf9hcpz3mhxue69uhkgetnvd5x7mmvd9hxwtn4wvspak3h$aionostrget-vnevent1qqsxpnzhw2ddf2uplsxgc5ctr9h6t65qaalzvzf0hvljwrz8q64637spp3mhxue69uhkyunz9e5k75j6gxm$aionostrquery-s-q'{"kinds": [1], "limit":10}'$aionostrsend--kind1--contenttest--private-key<privatekey>$aionostrmirror-rwss://source.relay-twss://target.relay--verbose'{"kinds": [4]}'Set environment variables:NOSTR_RELAYS=wss://brb.io,wss://nostr.mom
NOSTR_KEY=`aionostr gen | head -1`CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.19.0 (2023.03.07)Improved benchmark:aionostr benchOptimized Event object0.18.0 (2023-03-03)Allow for pretty-printing events, or just printing the contentEnable authentication when mirroring0.17.0 (2023-03-03)SupportnaddrNIP-19 type0.16.0 (2023-02-11)Improve benchmarkAllow manager to authenticate0.11.0 (2023-01-30)auto authenticatesupport ‘note’ NIP-19 type0.7.0-0.8.0 (2023-01-28)support for nrelay type0.6.0 (2023-01-25)Implement reconnect0.5.0 (2023-01-25)Support NIP-210.1.0 (2023-01-18)First release on PyPI.
Package: aionotify
aionotifyis a simple, asyncio-based inotify library.Its use is quite simple:importasyncioimportaionotify# Setup the watcherwatcher=aionotify.Watcher()watcher.watch(alias='logs',path='/var/log',flags=aionotify.Flags.MODIFY)asyncdefwork():awaitwatcher.setup()for_iinrange(10):# Pick the 10 first eventsevent=awaitwatcher.get_event()print(event)watcher.close()asyncio.run(work())LinksCode athttps://github.com/rbarrois/aionotifyPackage athttps://pypi.python.org/pypi/aionotify/Continuous integration athttps://travis-ci.org/rbarrois/aionotify/EventsAn event is a simple object with a few attributes:name: the path of the modified fileflags: the modification flag; useaionotify.Flags.parse()to retrieve a list of individual values.alias: the alias of the watch triggering the eventcookie: for renames, this integer value links the “renamed from” and “renamed to” events.Watchesaionotifyuses a system of “watches”, similar to inotify.A watch may have an alias; by default, it uses the path name:watcher=aionotify.Watcher()watcher.watch('/var/log',flags=aionotify.Flags.MODIFY)# Similar to:watcher.watch('/var/log',flags=aionotify.Flags.MODIFY,alias='/var/log')A watch can be removed by using its alias:watcher=aionotify.Watcher()watcher.watch('/var/log',flags=aionotify.Flags.MODIFY)watcher.unwatch('/var/log')
Package: aionova
aionovaA simple asyncio Python library to interact with the Anova Precision Cooker.Getting your cooker_id/cooker_secretSee the advice given here:https://github.com/bmedicke/anova.py/issues/1#issuecomment-446835744CreditsBased on @bmedicke's libraryhttps://github.com/bmedicke/anova.py
Package: aiontai
Async wrapper for nhentai APIInstallation$pipinstallaiontaiHow to useCreate clientimportasynciofromaiohttpimportClientSessionfromaiontaiimport(NHentaiClient,NHentaiAPI,Conventer,)asyncdefmain()->None:client_object=NHentaiClient(api=NHentaiAPI(ClientSession(),),conventer=Conventer(),)asyncio.run(main())Or can useinjectorthat will create the object itself (Next examples will be using it)importasynciofrominjectorimportInjectorfromaiontaiimport(NHentaiClient,ClientModule,)asyncdefmain()->None:injector=Injector(ClientModule())client_object=injector.get(NHentaiClient)asyncio.run(main())Example of using the clientasyncdefmain()->None:injector=Injector(ClientModule())client_object=injector.get(NHentaiClient)asyncwithclient_objectasclient:# Will close the session itselfdoujin=awaitclient.get_random_doujin()forpageindoujin.images:print(page.url)print(doujin.to_json())asyncio.run(main())Example of using the proxy...frominjectorimport(provider,Injector,Module,)fromaiohttp_proxyimportProxyConnector# pip install aiohttp_proxy...classAiohttpProxyModule(Module):def__init__(self,proxi_url:str)->None:self._proxi_url=proxi_url@providerdefprovide_client_session(self)->ClientSession:connector=ProxyConnector.from_url(self._proxi_url)returnClientSession(connector=connector)asyncdefmain()->None:injector=Injector(modules=[ClientModule(),AiohttpProxyModule("http://user:password@127.0.0.1:1080"),],)client_object=injector.get(NHentaiClient)asyncio.run(main())Example of using the Low level apiasyncdefmain()->None:injector=Injector(ClientModule())client_object=injector.get(NHentaiAPI)asyncwithclient_objectasclient:doujin=awaitclient.get_random_doujin()# Return: Dict[str, Any]# from api without loss of informationprint(doujin)asyncio.run(main())
Package: aionuki
aionukiAsynchronous Python library for interacting with Nuki locks and openers. Forked frompynuki. Refactored to use aiohttp and asyncio.Supports automatic bridge discovery usingnuki.ioservers and interactive authentication without manually entering any token.Supports parsing callbacks and integrating the result in the object's data structure. Full support of theNuki API Spec v1.12PDF HereInstallationpipinstall-UaionukiUsageimportasynciofromaionukiimportNukiBridgeasyncdefmain():bridges=awaitNukiBridge.discover()asyncwith(bridges[0])(token=None)asbr:print("Starting the interactive auth procedure.",br)ifnotbr.token:print("Received token:",awaitbr.auth())awaitbr.connect()lock=(awaitbr.locks)[0]awaitlock.lock()awaitlock.unlock()loop=asyncio.get_event_loop()loop.run_until_complete(main())More info in theexamplesdirectory.
Package: aionuts
AionutsОсновная идея проекта - использование декораторов в python, за место if else логики, избавление от громостких блоков чем то более подходящим, а так же ускорение работы за счет использования асинхронности.Синтаксис и большинство команд приемствуются с другого подобного фреймворка - aiogram. Это сделано с расчетом на возможность изменения лишь нескольких строчек, для перенисения/переписания бота от апи телеграмма на апи Вконтакте.
Package: aio-nxapi
Cisco NX-API asyncio ClientThis repository contains a Cisco NX-API asyncio based client that uses
thehttpxas an underlying transport andlxmlas the basis for handling XML.Note: This client does not support the NETCONF interface.WORK IN PROGESSQuick ExampleThie following shows how to create a Device instance and run a list of
commands.By default the Device instance will use HTTPS transport.  The Device instance
supports the following settings:host- The device hostname or IP addressusername- The login user-namepassword- The login passwordproto-(Optional)Choose either "https" or "http", defaults to "https"port-(Optional)Chose the protocol port to override proto defaultThe result of command execution is a list of CommandResults (namedtuple).
Theoutputfield will be:lxml.Element when output format is 'xml'dict when output format is 'json'str when output format is 'text'fromasyncnxapiimportDeviceusername='dummy-user'password='dummy-password'asyncdefrun_test(host):dev=Device(host=host,creds=(username,password))res=awaitdev.exec(['show hostname','show version'],ofmt='json')forcmdinres:ifnotcmd.ok:print(f"{cmd.command}failed")continue# do something with cmd.output as dict since ofmt was 'json'LimitationsChunking is not currently supported.  If anyone has need of this feature
please open an issue requesting support.ReferencesCisco DevNet NX-API Rerefence:https://developer.cisco.com/site/cisco-nexus-nx-api-references/Cisco platform specific NX-API references:N3K systems, requires 7.0(3)I2(2) or later:https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus3000/sw/programmability/7_x/b_Cisco_Nexus_3000_Series_NX-OS_Programmability_Guide_7x/b_Cisco_Nexus_3000_Series_NX-OS_Programmability_Guide_7x_chapter_010010.htmlN5K system, requires 7.3(0)N1(1) or later:https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/programmability/guide/b_Cisco_Nexus_5K6K_Series_NX-OS_Programmability_Guide/nx_api.html#topic_D110A801F14F43F385A90DE14293BA46N7K systems:https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus7000/sw/programmability/guide/b_Cisco_Nexus_7000_Series_NX-OS_Programmability_Guide/b_Cisco_Nexus_7000_Series_NX-OS_Programmability_Guide_chapter_0101.htmlN9K systems:https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/6-x/programmability/guide/b_Cisco_Nexus_9000_Series_NX-OS_Programmability_Guide/b_Cisco_Nexus_9000_Series_NX-OS_Programmability_Guide_chapter_011.html
Package: aiookru
aiookruaiookru is a pythonok.ru APIwrapper.
The main features are:authorization (Authorization Code,Implicit Flow,Password Grant,Refresh Token)REST APImethodsUsageTo useok.ru APIyou need a registered app
andok.ruaccount.
For more details, seeaiookru Documentation.Client applicationUseClientSessionwhen REST API is needed in:client component of the client-server applicationstandalone mobile/desktop applicationi.e. when you embed your app’s info (application key) in publicly available code.fromaiookruimportClientSession,APIsession=ClientSession(app_id,app_key,access_token,session_secret_key)api=API(session)events=awaitapi.events.get()friends=awaitapi.friends.get()Passsession_secret_keyandaccess_tokenthat were received after authorization.
For more details, seeauthorization instruction.Server applicationUseServerSessionwhen REST API is needed in:server component of the client-server applicationrequests from your serversfromaiookruimportServerSession,APIsession=ServerSession(app_id,app_key,app_secret_key,access_token)api=API(session)events=awaitapi.events.get()friends=awaitapi.friends.get()Passapp_secret_keyandaccess_tokenthat was received after authorization.
For more details, seeauthorization instruction.Installationpipinstallaiookruorpython setup.py installSupported 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]Licenseaiookruis released under the BSD 2-Clause License.
Package: aio-omdb
aio-omdbAsyncronous and synchronous Python clients for OMDb (the Open Movie Database).Usagefromaio_omdb.clientimportAsyncOMDBClient,SyncOMDBClientOMDB_API_KEY='...'# Get your key from OMDBa_client=AsyncOMDBClient(api_key=OMDB_API_KEY)s_client=SyncOMDBClient(api_key=OMDB_API_KEY)# Client provides the following methods:# Get by IMDB IDawaita_client.get_by_id('tt1000252')s_client.get_by_id('tt1000252')# Get by exact titleawaita_client.get_by_id('Rome, open city')s_client.get_by_id('Rome, open city')# Search title by a word or phraseawaita_client.search('Spock')s_client.search('Spock')The following exceptions may be raised:aio_omdb.exc.InvalidAPIKey: if an invalid API key is used;aio_omdb.exc.MovieNotFound: if no movie can be found inget_by_idorget_by_title.TestingInstall thetestingextraspipinstall-Ue.[testing]Create file.envin the project root and put your OMDb API key there:OMDB_API_KEY=<your API key>Run testsmaketestEnjoy!
Package: aioopenexchangerates
aioopenexchangeratesFetch rates from openexchangerates with aiohttp.InstallationInstall this via pip (or your favourite package manager):pip install aioopenexchangeratesUsageimportasynciofromaioopenexchangeratesimportClient,OpenExchangeRatesErrorasyncdefmain()->None:"""Run main."""asyncwithClient("your_api_key")asclient:try:result=awaitclient.get_latest()exceptOpenExchangeRatesErroraserr:print(err)else:print(result)if__name__=="__main__":asyncio.run(main())CreditsThis package was created withCookiecutterand thebrowniebroke/cookiecutter-pypackageproject template.
Package: aioopenssl
aioopensslprovides aasyncioTransport which usesPyOpenSSLinstead of the built-in ssl
module.The transport has two main advantages compared to the original:The TLS handshake can be deferred by passinguse_starttls=Trueand later
calling thestarttls()coroutine method.This is useful for protocols with aSTARTTLSfeature.A coroutine can be called during the TLS handshake; this can be used to defer
the certificate check to a later point, allowing e.g. to get user feedback
before thestarttls()method returns.This allows to ask users for certificate trust without the application layer
protocol interfering or starting to communicate with the unverified peer.NoteUse this module at your own risk. It has lower test coverage than I’d like
it to have; it has been exported from aioxmpp on request, where it undergoes
implicit testing. If you find bugs, please report them. If possible, add
regression tests while you’re at it.If you find security-critical bugs, please follow the procedure announced in
theaioxmpp readme.`DocumentationOfficial documentation can be built with sphinx and is available onlineon our servers.
Package: aioorm
version: 0.1.6status: productionauthor: hszemail:hsz1273327@gmail.comAsyncio interface forpeeweemodeled aftertorpeeweeFeaturesupport mysql and postgresqldatabase factory using database URLuse peewee’s fieldsManyToManyField supportShortcuts supportcsv dump /load supportcan use playhose.postgres_ext.JSONFieldInstallpython-mpip install aioormExample: GRUDfromaioormimportAioModel,AioMySQLDatabasefrompeeweeimportCharField,TextField,DateTimeFieldfrompeeweeimportForeignKeyField,PrimaryKeyFielddb=AioMySQLDatabase('test',host='127.0.0.1',port=3306,user='root',password='')classUser(AioModel):username=CharField()classMeta:database=dbclassBlog(AioModel):user=ForeignKeyField(User)title=CharField(max_length=25)content=TextField(default='')pub_date=DateTimeField(null=True)pk=PrimaryKeyField()classMeta:database=db# create connection poolawaitdb.connect(loop)# countawaitUser.select().count()# async iteration on select queryasyncforuserinUser.select():print(user)# fetch all records as a list from a query in one passusers=awaitUser.select()# insertuser=awaitUser.create(username='kszucs')# modifyuser.username='krisztian'awaituser.save()# async iteration on blog set[b.titleasyncforbinuser.blog_set.order_by(Blog.title)]# close connection poolawaitdb.close()# see more in the testsExample: Many to manyNote thatAioManyToManyFieldmust be used instead ofManyToMany.fromaioormimportAioManyToManyFieldclassUser(AioModel):username=CharField(unique=True)classMeta:database=dbclassNote(AioModel):text=TextField()users=AioManyToManyField(User)classMeta:database=dbNoteUserThrough=Note.users.get_through_model()asyncforuserinnote.users:# do something with the usersCurrently the only limitation I’m aware of immidiate setting of instance relation must be replaced with a method call:# original, which is not supportedcharlie.notes=[n2,n3]# use insteadawaitcharlie.notes.set([n2,n3])SerializingConverting to dict requires the asyncified version ofmodel_to_dictfromaioormimportmodel_to_dictserialized=awaitmodel_to_dict(user)Dump to csvtables can be dump to a csv file.fromaioorm.utilsimportaiodump_csvquery=User.select().order_by(User_csv.id)awaitaiodump_csv(query,str(filepath))DocumentationDocumentation on Readthedocs.TODOasync dataset supportmore testLimitationsuntested transactionsonly support mysql and postgresqlBug fixfixedgetandget_or_create‘s bug
Package: aio-ormsql
aio_ormsqlSimple asynchronous MySQL ORM class.Easy installpip3 install aio_ormsqlRequiredpip3 install asyncio aiomysqlPython 3.6+Example usageDo imports:fromaio_ormsql.dbimportDataBasefromaio_ormsql.classesTable,Column,WHEREWhere:DataBase- class for working with MySQLTable- class for creating a new tableColumn- class for creating a columnsWHERE- class for creating where statementsFollow examples ans see their output:ExamplesCreating tabletbl=Table('tests',Column('id',int),Column('tname',str))Connection to databasedb=DataBase('admin','admin','tests')awaitdb.connect()Simple WHERE statementwhere=WHERE(tbl.tname=='admin')print(where)# Output:# WHERE `tname`='admin'Another WHERE statementwhere2=WHERE((tbl.id>=20)|(tbl.tname=='admin'))print(where2)# Output:# WHERE `id`>=20 OR `tname`='admin'SELECT examplestatement=awaitdb.select([tbl.id,tbl.tname],where=where,table=tbl,back=True)print(statement)# Output:# SELECT DISTINCT `id`, `tname` FROM `tests` WHERE `tname`='admin'SELECT example 2statement2=awaitdb.select([tbl.id,tbl.tname],False,where2,table=tbl,back=True)print(statement2)# Output:# SELECT`id`, `tname` FROM `tests` WHERE `id`>=20 OR `tname`='admin'INSERT examplestatement3=awaitdb.insert({tbl.id:123,tbl.tname:'Johan'},tbl,back=True)print(statement3)# Output:# INSERT INTO `tests` (`id`, `tname`) VALUES (123, 'Johan')INSERT example 2statement4=awaitdb.update({tbl.id:'123',tbl.tname:'Admin'},WHERE(tbl.tname=='Johan'),tbl,back=True)print(statement4)# Output:# UPDATE `tests` SET `id`=123, `tname`='Admin' WHERE `tname`='Johan'Working with large DBarray=db.fetch_gen(awaitdb.select([tbl.id,tbl.tname],back=True))asyncforiteminarray:print('New pair:',item)# And you can see row-by-row outputClosing connection and wait for completing tasksawaitdb.close()
Package: aiooss
Based onhttps://github.com/aliyun/aliyun-oss-python-sdk文档参考官方文档, 调用io操作的接口前加await即可result=awaitbucket.get_object(...获取返回内容:body = await result.resp.read()Getting started# -*- coding: utf-8 -*-importaioossendpoint='http://oss-cn-hangzhou.aliyuncs.com'# Suppose that your bucket is in the Hangzhou region.auth=aiooss.Auth('<Your AccessKeyID>','<Your AccessKeySecret>')asyncdefgo(loop):# The object key in the bucket is story.txtasyncwithaiooss.Bucket(auth,endpoint,'<your bucket name>')asbucket:key='story.txt'# Uploadawaitbucket.put_object(key,'Ali Baba is a happy youth.')# Uploaddata=dict(a=1,b=2)awaitbucket.put_object(key,json.dumps(data),headers={'Content-Type':'application/json'})# Downloadresult=awaitbucket.get_object(key)print(result.headers)print(awaitresult.resp.read())# Deleteawaitbucket.delete_object(key)# Traverse all objects in the bucketasyncforobject_infoinaiooss.ObjectIterator(bucket):print(object_info.key)loop=asyncio.get_event_loop()loop.run_until_complete(go(loop))
Package: aiooss2
Aiooss2FeaturesTODORequirementsTODOInstallationYou can installAiooss2viapipfromPyPI:$pipinstallaiooss2UsageContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theApache 2.0 license,Aiooss2is free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.
Package: aiooui
aioouiSource Code:https://github.com/bluetooth-devices/aioouiAsync OUI lookupsInstallationInstall this via pip (or your favourite package manager):pip install aioouiUsageStart by importing it:importaioouiContributors ✨Thanks goes to these wonderful people (emoji key):This project follows theall-contributorsspecification. Contributions of any kind welcome!CreditsThis package was created withCopierand thebrowniebroke/pypackage-templateproject template.
Package: aioowm
aioowm - Easy Async library for working with OpenWeatherMapЧто нужно, чтобы пользоваться библиотекой:PyCharmOpenWeatherMap TokenУстановка:pipinstallaioowm
pipinstall-Uhttps://github.com/vladislavkovalskyi/aioowm/archive/master.zipСсылки:Пример:fromasyncioimportrunfromaioowmimportOWMweather=OWM(token="OpenWeatherMap Token",language="ru")asyncdefapp():result=awaitweather.get("Saint Petersburg")print(f"Город:{result.city.name}({result.city.country})\n"f"Температура:{result.weather.temperature.now}°C\n"f"Описание:{result.weather.description}\n"f"Скорость ветра:{result.weather.wind.speed}м/с")run(app())Вывод:Город: Санкт-Петербург (RU)
Температура: 2.12°C
Описание: Облачно
Скорость ветра: 1.34 м/с