An open API service indexing awesome lists of open source software.

https://github.com/rft0/recuests

A CPython wrapper for my HTTP client.
https://github.com/rft0/recuests

c cpython curl python-extension recuests

Last synced: 4 months ago
JSON representation

A CPython wrapper for my HTTP client.

Awesome Lists containing this project

README

        

## Recuests
Python bindings for my [HTTP client](https://github.com/epsilonr/httpclient) as its name implies it have `requests` like interface.

### Struct of Response
```py
@final
class Response:
body: str
headers: dict
status: int
```

### Methods
All methods are overloaded by C library.

```py
def get(url: str, headers: Optional[Dict[str, str]] = None) -> Response:

def post(url: str, headers: Optional[Dict[str, str]] = None, data: str = "") -> Response:

def put(url: str, headers: Optional[Dict[str, str]] = None, data: str = "") -> Response:

def delete(url: str, headers: Optional[Dict[str, str]] = None) -> Response:
```

### Requirements
* Precompiled binaries only for linux (yet you can still generate yours with make)
* Only tested with python 3.11