Yet Another Asyncio Requests
Install and usage are as expected. To install:
$ pip install yaar
And then the usage:
import yaar
response = await yaar.get(url)
print(response.status, response.text)
print(response.json())
# send a json in the request body
response = await yaar.post(url, json={"some": "json"})
print(response.status)
To send headers in your request use:
response = await yaar.get(url, headers={'Authentication': 'bearer} XYZ')
Here you have all usual the methods like put, delete, etc..
In case you need a custom session you can use:
session = aiohttp.ClientSession(loop=loop)
response = await yaar.get(url, session=session)
Metadata
Release files for yaar 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yaar-0.3.3.tar.gz | 2.9 kB | Details |
Release files / yaar-0.3.3.tar.gz
| Download URL | yaar-0.3.3.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9edb9e3d6c0b7e24fec3e7a8d0c293cc350ded44bbabe4c0cab3e26a1e3164b3
|
|
BLAKE2b-256 checksum How to use checksums |
639c34445f4dfe35b904f6aea09c86e1ab6f19e3f6486d9c57e5c337047144f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|