Asynchronous REST requests with proxy support.
Project description
rest-requests
Asynchronous SLURM REST requests with proxy support.
Installation
pip install rest-requests
Usage
import asyncio
from rest_requests import request, RequestMethod
async def main():
response = await request(
method=RequestMethod.POST,
url="https://jsonplaceholder.typicode.com/posts",
# headers={"key": "value"},
body={"title": "foo", "body": "bar", "userId": 1},
# proxy_url="socks5://localhost:8080
)
assert response == {
"userId": 1,
"id": 101,
"title": "foo",
"body": "bar",
}
if __name__ == "__main__":
asyncio.run(main())
Contributors
License
rest-requests is distributed under the terms of the CC-BY-SA-4.0 license.
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
rest_requests-0.0.3.tar.gz
(10.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rest_requests-0.0.3.tar.gz.
File metadata
- Download URL: rest_requests-0.0.3.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f348320848688cc0f72d253c01de71e72f9d9952c15989496c010703691a4b84
|
|
| MD5 |
617ba82166d0a7444482ebc9a11b080c
|
|
| BLAKE2b-256 |
1d7b4a89fb44495ac60ce925fa5d301a682d5844cade690817820705b2bf830a
|
File details
Details for the file rest_requests-0.0.3-py3-none-any.whl.
File metadata
- Download URL: rest_requests-0.0.3-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8060e194b8624ccad41b7d3abf9b155647800c5139ea827c154fffa3b823a8bb
|
|
| MD5 |
aa96a7e01a6e64a5f7e81e9de053281c
|
|
| BLAKE2b-256 |
c4b71a5822542f31727ae7011d3d91e05de1797ff887c14f0ca0ce761a775dce
|