Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Requests + asyncio

Project Description

This module contains an asynchronous method to send get and post http requests.

Use 'AsRequests' to send them.

Simple and effective.
:)

Usage is simple:

```
from asrequests import AsRequests

urls = [
'http://nodomain/',
'https://github.com',
'https://www.python.org/'
]
```

Send them all the same time.

```
>>> with AsRequests() as ar:
for i in urls:
ar.get(i)
...
>>>print(ar.result)
[<Response [200]>, ErrorRequest(url='http://nodomain/', text='', ...), <Response [200]>]
```

Using like requests:
```
from asrequests import asrequests

async def get_http():
for i in urls:
response = await asrequests.get(i)
print(response)

....
asyncio.run_until_complete(get_http)

===
<Response [200]>
ErrorRequest(url='http://nodomain/', text='', ...)
<Response [200]>
```

Release History

Release History

This version
History Node

0.1.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
asrequests-0.1.1.tar.gz (4.1 kB) Copy SHA256 Checksum SHA256 Source Nov 23, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting