Yet Another Asyncio Requets
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yaar-0.3.3.tar.gz
(2.9 kB
view details)
File details
Details for the file yaar-0.3.3.tar.gz.
File metadata
- Download URL: yaar-0.3.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9edb9e3d6c0b7e24fec3e7a8d0c293cc350ded44bbabe4c0cab3e26a1e3164b3
|
|
| MD5 |
1f7a7f8d7633f599a130223c6e563b1b
|
|
| BLAKE2b-256 |
639c34445f4dfe35b904f6aea09c86e1ab6f19e3f6486d9c57e5c337047144f9
|