No project description provided
Project description
Reqsnaked
Reqsnaked is a blazing fast async/await HTTP client for Python written on Rust using reqwests.
- Works 15% faster than
aiohttp
on average - RAII approach without context managers
- Memory-efficient lazy JSON parser
- Fully-typed even being written on Rust
Docs: https://deknowny.github.io/reqsnaked/devel/
Overview
import asyncio
import datetime
import reqsnaked
async def main():
client = reqsnaked.Client(
user_agent="Reqsnaked/1.0",
headers={"X-Foo": "bar"},
store_cookie=True
)
request = reqsnaked.Request(
"POST", "https://httpbin.org/anything",
multipart=reqsnaked.Multipart(
reqsnaked.Part(
"foo", b"01010101",
filename="foo.txt",
mime="text/plain"
)
),
query={"foo": "bar"},
headers={"X-Bar": "foo"},
timeout=datetime.timedelta(seconds=30),
)
response = await client.send(request)
print(response.status)
data = await response.json()
data.show()
asyncio.run(main())
HTTPStatus.OK
{
"args": {
"foo": "bar"
},
"data": "",
"files": {
"foo": "01010101"
},
"form": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, br",
"Content-Length": "246",
"Content-Type": "multipart/form-data; boundary=a59212f1bfcc112f-b3b83c8afd39b140-f302f74df067620a-a8a38a37c3355abe",
"Host": "httpbin.org",
"User-Agent": "Reqsnaked/1.0",
"X-Amzn-Trace-Id": "Root=1-63fcfd9b-412668b5117367524668f43b",
"X-Bar": "foo",
"X-Foo": "bar"
},
"json": null,
"method": "POST",
"origin": "1.1.1.1",
"url": "https://httpbin.org/anything?foo=bar"
}
Installlation
Currently the library is not published to PyPI, so the only way to install it is from GitHub:
python -m pip install -U https://github.com/deknowny/reqsnaked/archive/main.zip
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
reqsnaked-0.1.0_beta1.tar.gz
(553.4 kB
view hashes)
Built Distributions
Close
Hashes for reqsnaked-0.1.0b1-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60df3fb33b9dbfc67f6a312b58ba342738d35c5f7e44d99ea14c980cadc956cc |
|
MD5 | 299e123dcdb48f55e7c8ff8fc7608e38 |
|
BLAKE2b-256 | 81575a03472c3db1c76fa02f619ecdfcfc5396d3a05ef59ba2a9be7389bf2211 |
Close
Hashes for reqsnaked-0.1.0_beta1-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0327b470057af9a78901b9959230c84016966a3f1f31b4af150979777db1f64c |
|
MD5 | 990da31251af6570a64db1461fc874b6 |
|
BLAKE2b-256 | 4d052475ff2c32707aea6348bfa3c98ca0a78fed0f3283afe72384706529a131 |
Close
Hashes for reqsnaked-0.1.0_beta1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d774727859594476c58a3eb36a086a1325997e3e70d7e2e002f6a62cd3f866e6 |
|
MD5 | 4194e698cd99e382a2c8bea58893ec66 |
|
BLAKE2b-256 | fe38576d5fff3b3035126ed0cb366d8dbeb6e83806d2379d5998278778d75a5f |
Close
Hashes for reqsnaked-0.1.0_beta1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e169851c9a0d238cee739535ef249f95215c86808fc51f75308ccde843b07978 |
|
MD5 | 685d5a33fdf331d206a3da7e107fee0f |
|
BLAKE2b-256 | 1e4bd1550975eb358d33682f9a11fe8ce97977547be1c4783f77e514f44ad085 |