MCPcopy Index your code
hub / github.com/deknowny/reqsnaked

github.com/deknowny/reqsnaked @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
97 symbols 264 edges 31 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Reqsnaked

Reqsnaked is a blazing fast async/await HTTP client for Python written on Rust using reqwests.


Docs: https://deknowny.github.io/reqsnaked/devel/

Overview

```python title="Example" 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

```json
{
  "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

Extension points exported contracts — how you extend this code

ToNative (Interface)
(no doc) [2 implementers]
src/py2rs/base.rs

Core symbols most depended-on inside this repo

json
called by 20
src/aio/response.rs
send
called by 14
src/aio/client.rs
query
called by 13
src/json.rs
to_string
called by 11
src/rs2py/http_version.rs
wrap_reqwest_error
called by 3
src/exceptions.rs
to_native
called by 3
src/py2rs/url.rs
init_module
called by 3
src/aio/mod.rs
get_reqsnaked_request
called by 2
sandbox/rrr.py

Shape

Function 45
Method 30
Class 12
Enum 9
Interface 1

Languages

Rust67%
Python33%

Modules by API surface

src/aio/response.rs10 symbols
tests/test_request.py7 symbols
src/json.rs7 symbols
sandbox/rrr.py7 symbols
src/aio/request.rs5 symbols
src/aio/client.rs5 symbols
benchmarks/test_libs.py5 symbols
src/rs2py/http_version.rs4 symbols
src/rs2py/header_map.rs4 symbols
src/py2rs/url.rs4 symbols
src/py2rs/http_method.rs4 symbols
src/aio/multipart/part.rs4 symbols

For agents

$ claude mcp add reqsnaked \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact