Saravanan666/pypi-org huggingface dataset:
Package: aiohttp-oauth2-session
aiohttp-oauth2-sessionA fully typed package that adds OAuth2 support for aiohttp.ClientSession.Installationpipinstallaiohttp-oauth2-sessionBasic Usagefromaiohttp_oauth2_sessionimportOAuth2SessionYou can create a session with or without a token already known.token={"access_token":"abc1234","token_type":"Bearer","expires_in":3600,"refresh_token":"def5678",}session=OAuth2Session(client_id="client_id",client_secret="client_secret",redirect_uri="https://example.com/oauth/redirect",scope="scope1 scope2",token=token,)# Which allows you to make authenticated requests straight away.resp=awaitsession.get("https://example.com/api/resource")awaitsession.close()You can also create a session without a token and fetch one later.session=OAuth2Session(client_id="client_id",client_secret="client_secret",redirect_uri="https://example.com/oauth/redirect",scope="scope1 scope2",)awaitsession.fetch_token(token_url="https://example.com/oauth/token",authorization_response="https://example.com/oauth/redirect?code=abc1234",)# now you can make authenticated requests.resp=awaitsession.get("https://example.com/api/resource")awaitsession.close()You can also use context managers to automatically close the session.asyncwithOAuth2Session(client_id="client_id",client_secret="client_secret",redirect_uri="https://example.com/oauth/redirect",scope="scope1 scope2",)assession:awaitsession.fetch_token(token_url="https://example.com/oauth/token",authorization_response="https://example.com/oauth/redirect?code=abc1234",)asyncwithsession.get("https://example.com/api/resource")asresp:print(awaitresp.json())Feel free to contribute!What still needs to be done:Add more comprehensive testsAdd typed support for other aiohttp client sessionsExpand the depency versions to be less restrictiveMake the code more readable, it's a bit messy right nowWhatever else you can think of. Please do open an issue or PR!This package is based ona gistbykellerza. Thank you very much!
Package: aiohttp-openmetrics
This project contains a simple middleware and /metrics route endpoint for
aiohttp that allow easy implementation of theopenmetricsprotocol.At the moment, this package is a thin wrapper around theprometheus_clientpackage.Example usagefromaiohttpimportwebfromaiohttp_openmetricsimportmetrics,metrics_middlewareapp=web.Application()app.middlewares.append(metrics_middlware)app.router.add_get('/metrics',metrics)web.run_app(app)LicenseThis package is licensed under the Apache v2 or later license.
Package: aiohttp-parameter-parser
URL query string / path parameter parser and validator foraiohttpviewsDeclare and validate HTTP query and path parameters inaiohttpviews.
Receive intended types instead of defaultstr. Receive single parameter or an array.Currently only path and URL query parameter locations are supported.Installationpipinstallaiohttp-parameter-parserBasic usage examplesfromdatetimeimportdatetimefromtypingimportOptionalimportpytzfromaiohttpimportwebfromaiohttp_parameter_parserimportParameterViewclassExampleView(ParameterView):date_format="%d-%m-%Y"# custom date format for date parameterstz=pytz.timezone("Europe/Berlin")# custom timezone for date parametersasyncdefget(self)->web.Response:my_tuple_of_ints:tuple[int,...]=self.query_parameter("parameter_name_in_request",required=True,is_array=True,max_items=6,# len() restriction for listis_int=True,max_value=1337,# maximum allowed value for array items)# If provided parameter is of wrong type or missing, a default# HTTP 400 response is returned to client.my_str:Optional[str]=self.path_parameter("a_string_parameter_name",# str is a default type for parsed parameter, so no# `is_string=True` flag can be usedchoices=["foo","bar","baz"],# enum)my_datetime:Optional[datetime]=self.query_parameter("my_datetime_parameter",is_date=True,)# will use custom timezone and date format provided abovereturnweb.json_response({"received_array_of_ints":my_tuple_of_ints,"received_str":my_str,"received_datetime":my_datetime.strftime(self.date_format),})Custom error response exampleSometimes you want to return custom error response instead of default HTTP 400.
Here's an example how to raise custom exception if validation fails:fromaiohttpimportwebfromaiohttp_parameter_parserimportParameterViewclassCustomErrorResponseView(ParameterView):defvalidation_error_handler(self,msg:str)->web.Response:# just override this method of base class# 'msg' is a human-readable explanation of validation errorj={"ok":False,"data":None,"error":{"description":msg,},}# you can use raise or return herereturnweb.json_response(status=418,data=j)
Package: aiohttp-poe
aiohttp_poeAn implementation of the Poe protocol using aiohttp.To run it:Create a virtual environment (Python 3.7 or higher)pip install .python -m aiohttp_poeIn a different terminal, runngrokto make it publicly
accessibleWrite your own botThis package can also be used as a base to write your own bot. You can inherit fromaiohttp_poe.PoeBotto make a bot:fromaiohttp_poeimportPoeBot,runclassEchoBot(PoeBot):asyncdefget_response(self,query,request):last_message=query["query"][-1]["content"]yieldself.text_event(last_message)if__name__=="__main__":run(EchoBot())Enable authenticationPoe servers send requests containing Authorization HTTP header in the format "Bearer
<api_key>," where api_key is the API key configured in the bot settings. \To validate the requests are from Poe Servers, you can either set the environment
variable POE_API_KEY or pass the parameter api_key in the run function like:if__name__=="__main__":run(EchoBot(),api_key=<key>)For a more advanced example that exercises more of the Poe protocol, seeCatbot.
Package: aiohttp-prometheus
HTTP metrics for a AIOHTTP applicationInstallingpipinstallaiohttp-prometheusUsagefromaiohttpimportwebfromaiohttp_prometheusimportMetricsMiddleware,MetricsViewapp=web.Application()app.middlewares.append(MetricsMiddleware())app.router.add_route('GET','/metrics',MetricsView),web.run_app(app)Example output for metric route# HELP aiohttp_http_requests_total Asyncio total Request Count
# TYPE aiohttp_http_requests_total counter
aiohttp_http_requests_total{handler="MetricsView",method="GET",status="2xx"} 7.0

# HELP aiohttp_http_request_duration_seconds Request latency
# TYPE aiohttp_http_request_duration_seconds histogram
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.01",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.05",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.1",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.75",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="1.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="2.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="5.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="7.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="10.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="15.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="20.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="30.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="+Inf",method="GET"} 7.0
Package: aiohttp-prometheus-client
HTTP metrics for a AIOHTTP applicationInstallingpipinstallaiohttp-prometheus-clientUsagefromaiohttpimportwebfromaiohttp_prometheusimportmetrics_middleware,MetricsViewapp=web.Application()app.middlewares.append(metrics_middleware)app.router.add_route('GET','/metrics',MetricsView),web.run_app(app)Example output for metric route# HELP aiohttp_http_requests_total Asyncio total Request Count
# TYPE aiohttp_http_requests_total counter
aiohttp_http_requests_total{handler="MetricsView",method="GET",status="2xx"} 7.0

# HELP aiohttp_http_request_duration_seconds Request latency
# TYPE aiohttp_http_request_duration_seconds histogram
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.01",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.05",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.1",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.75",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="1.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="2.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="5.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="7.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="10.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="15.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="20.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="30.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="+Inf",method="GET"} 7.0
Package: aiohttp-prometheus-exporter
Export aiohttp metrics for Prometheus.ioUsageRequirementsaiohttp >= 3InstallationInstall with:pipinstallaiohttp-prometheus-exporterServer quickstartfromaiohttpimportwebfromaiohttp_prometheus_exporter.handlerimportmetricsfromaiohttp_prometheus_exporter.middlewareimportprometheus_middleware_factoryasyncdefhello(request):returnweb.Response(text="Hello, world")app=web.Application()app.add_routes([web.get('/',hello)])app.middlewares.append(prometheus_middleware_factory())app.router.add_get("/metrics",metrics())web.run_app(app)Client quickstartimportaiohttpfromaiohttp_prometheus_exporter.traceimportPrometheusTraceConfigasyncwithaiohttp.ClientSession(trace_configs=[PrometheusTraceConfig())assession:asyncwithsession.get('http://httpbin.org/get')asresp:print(resp.status)print(awaitresp.text())Now, client metrics are attached to metrics exposed by your web server.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.4 (2020-04-07)Fixed building problemsConfigured black linter0.1.0 (2020-04-07)First release on PyPI.
Package: aiohttp-prometheus-monitoring
# aiohttp_prometheus_monitoring[![PyPI](https://img.shields.io/pypi/v/aiohttp-prometheus-monitoring.svg?maxAge=3600)](https://pypi.python.org/pypi/aiohttp-prometheus-monitoring)[![Python Versions](https://img.shields.io/pypi/pyversions/aiohttp-prometheus-monitoring.svg?maxAge=3600)](https://pypi.python.org/pypi/aiohttp-prometheus-monitoring)This package allows to monitor availability of your aiohttp-application components and exports the metrics for prometheus scraper.It can monitor:- external host HTTP status- postgres database status- mysql database status- redis availability- rabbit AMQP availability- whatever else, as can be extended easilyIt periodically calls services, stores boolean result in Gauge metrics and exports the metrics via the /metrics endpoint.No additional workers required, everything is built-in into your app.Then you can build graphs based on this data:![Graphs](graphs.png)## Install:pip install aiohttp_prometheus_monitoring[amqp,redis,postgres,mysql]## Sample config:MONITORING = {'route_ping': '/ping','route_metrics': '/metrics','metrics': [{'name': 'monitoring_http','description': 'Check HTTP status','module': 'aiohttp_prometheus_monitoring.metrics.http.HttpMetric','sleep_time': 300,'params': {'url': 'http://localhost/my_ping/','timeout': 1,'verify_ssl': True,}},{'name': 'monitoring_redis','description': 'Check redis connection','module': 'aiohttp_prometheus_monitoring.metrics.redis.RedisMetric','sleep_time': 60,'params': {'host': 'localhost','port': '6379',}},{'name': 'monitoring_mq','description': 'Check MQ connection','module': 'aiohttp_prometheus_monitoring.metrics.amqp.AmqpMetric','sleep_time': 60,'params': {'host': 'localhost','port': '5672','user': 'root','password': '123','vhost': 'myvhost',}},{'name': 'monitoring_postgres','description': 'Check postgres connection','module': 'aiohttp_prometheus_monitoring.metrics.postgres.PostgresMetric','sleep_time': 60,'params': {'database': 'core','user': 'core','password': 'core','host': 'localhost','port': 5433,}},{'name': 'monitoring_mysql','description': 'Check mysql connection','module': 'aiohttp_prometheus_monitoring.metrics.mysql.MySQLMetric','sleep_time': 60,'params': {'database': 'core','user': 'core','password': 'core','host': 'localhost','port': 3007,}},]}## Usage:from aiohttp import webfrom aiohttp_prometheus_monitoring import setup_monitoringdef create_app(loop=None):app = web.Application()loop.run_until_complete(setup_monitoring(settings.MONITORING, app))return appCheck http://YOURAPP/ping and http://YOURAPP/metrics - /ping endpoint will respond "pong", /metrics endpoint will have metrics in prometheus format.
Package: aiohttp-prometheus-swaggered
HTTP metrics for a AIOHTTP applicationInstallingpipinstallaiohttp-prometheus-clientUsagefromaiohttpimportwebfromaiohttp_prometheusimportmetrics_middleware,MetricsViewapp=web.Application()app.middlewares.append(metrics_middleware)app.router.add_route('GET','/metrics',MetricsView),web.run_app(app)Example output for metric route# HELP aiohttp_http_requests_total Asyncio total Request Count
# TYPE aiohttp_http_requests_total counter
aiohttp_http_requests_total{handler="MetricsView",method="GET",status="2xx"} 7.0

# HELP aiohttp_http_request_duration_seconds Request latency
# TYPE aiohttp_http_request_duration_seconds histogram
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.01",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.05",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.1",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.75",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="1.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="2.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="5.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="7.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="10.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="15.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="20.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="30.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="+Inf",method="GET"} 7.0
Package: aiohttp-proxy
aiohttp-proxySOCKS proxy connector foraiohttp. HTTP, HTTPS, SOCKS4(a) and SOCKS5(h) proxies are supported.RequirementsPython >= 3.5.3aiohttp >= 2.3.2  # including v3.xInstallationpip install aiohttp_proxyUsageaiohttp usage:importaiohttpfromaiohttp_proxyimportProxyConnector,ProxyTypeasyncdeffetch(url):connector=ProxyConnector.from_url('http://user:password@127.0.0.1:1080')### or use ProxyConnector constructor# connector = ProxyConnector(#     proxy_type=ProxyType.SOCKS5,#     host='127.0.0.1',#     port=1080,#     username='user',#     password='password',#     rdns=True# )asyncwithaiohttp.ClientSession(connector=connector)assession:asyncwithsession.get(url)asresponse:returnawaitresponse.text()aiohttp-socks also providesopen_connectionandcreate_connectionfunctions:fromaiohttp_proxyimportopen_connectionasyncdeffetch():reader,writer=awaitopen_connection(socks_url='http://user:password@127.0.0.1:1080',host='check-host.net',port=80)request=(b"GET /ip HTTP/1.1\r\n"b"Host: check-host.net\r\n"b"Connection: close\r\n\r\n")writer.write(request)returnawaitreader.read(-1)Why give aiohttp a new proxy supportFirst must declare, our code is based onaiohttp-socks, thank you very much for the hard work.But in order to more flexible support for multiple proxy methods (not just SOCKS proxy),
we decided to fork [aiohttp-socks] (https://github.com/romis2012/aiohttp-socks), which is currently based on it.Combine with native aiohttp to provide HTTP/HTTPS proxy instead of writing troublesome discriminating code based on the type of proxy.
Package: aiohttp-ratelimiter
aiohttp-ratelimiteraiohttp-ratelimiter is a rate limiter for the aiohttp.web framework.
This is a new library, and we are always looking for people to contribute. If you see something wrong with the code or want to add a feature, please create a pull request
onour github.Install from gitpython -m pip install git+https://github.com/JGLTechnologies/aiohttp-ratelimiterInstall from pypipython -m pip install aiohttp-ratelimiter
// if redis is being used
python -m pip install aiohttp-ratelimiter[redis]
// if memcached is being used
python -m pip install aiohttp-ratelimiter[memcached]Examplefromaiohttpimportwebfromaiohttplimiterimportdefault_keyfunc,Limiterfromaiohttplimiter.redis_limiterimportRedisLimiterfromaiohttplimiter.memcached_limiterimportMemcachedLimiterapp=web.Application()routes=web.RouteTableDef()# In Memorylimiter=Limiter(keyfunc=default_keyfunc)# Redislimiter=RedisLimiter(keyfunc=default_keyfunc,uri="redis://localhost:6379")# Memcachedlimiter=MemcachedLimiter(keyfunc=default_keyfunc,uri="memcached://localhost:11211")@routes.get("/")# This endpoint can only be requested 1 time per second per IP address@limiter.limit("1/second")asyncdefhome(request):returnweb.Response(text="test")app.add_routes(routes)web.run_app(app)You can exempt an IP from rate limiting using the exempt_ips kwarg.fromaiohttplimiterimportLimiter,default_keyfuncfromaiohttpimportwebapp=web.Application()routes=web.RouteTableDef()# 192.168.1.245 is exempt from rate limiting.# Keep in mind that exempt_ips takes a set not a list.limiter=Limiter(keyfunc=default_keyfunc,exempt_ips={"192.168.1.245"})@routes.get("/")@limiter.limit("3/5minutes")asyncdeftest(request):returnweb.Response(text="test")app.add_routes(routes)web.run_app(app)You can create your own error handler by using the error_handler kwarg.fromaiohttplimiterimportAllow,RateLimitExceeded,Limiter,default_keyfuncfromaiohttpimportwebdefhandler(request:web.Request,exc:RateLimitExceeded):# If for some reason you want to allow the request, return aiohttplimitertest.Allow().ifsome_condition:returnAllow()returnweb.Response(text=f"Too many requests",status=429)limiter=Limiter(keyfunc=default_keyfunc,error_handler=handler)If multiple paths use one handler like this:@routes.get("/")@routes.get("/home")@limiter.limit("5/hour")defhome(request):returnweb.Response(text="Hello")Then they will have separate rate limits. To prevent this use the path_id kwarg.@routes.get("/")@routes.get("/home")@limiter.limit("2/3days",path_id="home")defhome(request):returnweb.Response(text="Hello")Views Example@routes.view("/")classHome(View):@limiter.limit("1/second")defget(self):returnweb.Response(text="hello")
Package: aiohttp-raw
aiohttp-rawUseaiohttpto send HTTP raw sockets (To Test RFC Compliance)Usageimportasyncioimportaiohttp_rawasyncdefmain():req=b"GET /get HTTP/1.1\r\nHost: httpbin.org\r\n\r\n"asyncwithaiohttp_raw.ClientSession()assession:asyncwithsession.raw("http://httpbin.org/get",data=req)asresponse:print(awaitresponse.text())loop=asyncio.new_event_loop()loop.run_until_complete(main())InstallationPrerequisitesPython 3.8+pip3installaiohttp-raw# speedupspipinstallaiohttp[speedups]# sockspipinstallaiohttp[socks]# speedups-sockspipinstallaiohttp[speedups-socks]
Package: aiohttp-remotes
The library is a set of useful tools foraiohttp.webserver.The full list of tools is:AllowedHosts– restrict a set of incoming connections to
allowed hosts only.BasicAuth– protect web application bybasic authauthorization.Cloudflare– make sure that web application is protected
by CloudFlare.ForwardedRelaxedandForwardedStrict– processForwardedHTTP header and modify correspondingscheme,host,remoteattributes in strong secured and
relaxed modes.Secure– ensure that web application is handled by HTTPS
(SSL/TLS) only, redirect plain HTTP to HTTPS automatically.XForwardedRelaxedandXForwardedStrict– the same
asForwardedRelaxedandForwardedStrictbut process old-fashionX-Forwarded-*headers instead of new standardForwarded.Readhttps://aiohttp-remotes.readthedocs.iofor more information.The library was donated by Ocean S.A.https://ocean.io/Thanks to the company for contribution.
Package: aiohttp-request
info:Global request for aiohttp serverInstallationpipinstallaiohttp_requestUsageimportasynciofromaiohttpimportwebfromaiohttp_requestimportThreadContext,middleware_factory,grequest,get_requestdefthread():assertgrequest['sense']==42asyncdeftask():# grequest is `lazy` version of requestassertgrequest['sense']==42loop=asyncio.get_event_loop()# works for threads as well with ThreadContextawaitloop.run_in_executor(None,ThreadContext(thread))asyncdefhello(request):# get_request is on-demand function to get current requestassertget_request()isrequestrequest['sense']=42# asyncio.Task is supportedawaitasyncio.ensure_future(task())returnweb.Response(text="Hello, world")app=web.Application(middlewares=[middleware_factory()])app.add_routes([web.get('/',hello)])web.run_app(app)Python 3.7+ is required, there is no way to support older python versions!!!NotesThe library relies onPEP 567and itsasyncio supportaiohttp-request works nicely with threads viacontextvars_executor, noThreadContextis neededimportasynciofromaiohttpimportwebfromaiohttp_requestimportmiddleware_factory,grequestfromcontextvars_executorimportContextVarExecutordefthread():assertgrequest['sense']==42asyncdefhello(request):request['sense']=42loop=asyncio.get_event_loop()awaitloop.run_in_executor(None,thread)returnweb.Response(text="Hello, world")loop=asyncio.get_event_loop()loop.set_default_executor(ContextVarExecutor())app=web.Application(middlewares=[middleware_factory()])app.add_routes([web.get('/',hello)])web.run_app(app)
Package: aiohttp-requests
aiohttp-requestsBehold, the power ofaiohttpclient withRequestssimplicity:importasyncioimportaiohttpfromaiohttp_requestsimportrequestsasyncdefmain():response=awaitrequests.get('https://api.github.com',auth=aiohttp.BasicAuth('user','password'))text=awaitresponse.text()json=awaitresponse.json()returnresponse,text,jsonr,text,json=asyncio.run(main())>>>r<ClientResponse(https://api.github.com/)[200OK]>>>>r.status200>>>r.headers['Content-Type']'application/json; charset=utf-8'>>>r.get_encoding()'utf-8'>>>text'{"current_user_url":"https://api.github.com/user",...'>>>json{'current_user_url':'https://api.github.com/user',...}Plus built-in concurrency control to do multiple requests safely:asyncdefmain():# Pass in a list of urls instead of just one. Optionally pass in as_iterator=True to iterate the responses.responses=awaitrequests.get(['https://api.github.com']*2,auth=aiohttp.BasicAuth('user','password'))print(responses)# [<ClientResponse(https://...) [200 OK]>, , <ClientResponse(https://...) [200 OK]>]# It defaults to 10 concurrent requests. If you can handle more, then set it higher:requests.max_concurrency=100asyncio.run(main())Therequestsobject is just proxyinggetand other HTTP verb methods toaiohttp.ClientSession, which returnsaiohttp.ClientResponse. To do anything else, read theaiohttpdoc.Links & Contact InfoPyPI Package:https://pypi.python.org/pypi/aiohttp-requestsGitHub Source:https://github.com/maxzheng/aiohttp-requestsReport Issues/Bugs:https://github.com/maxzheng/aiohttp-requests/issuesConnect:https://www.linkedin.com/in/maxzhengContact: maxzheng.os @t gmail.com