Recuests
Python bindings for my HTTP client as its name implies it have requests like interface.
Struct of Response
class Response:
def __init__(self, body: str, status: int, headers: dict):
self.body = body
self.headers = headers
self.status = status
def json(self) -> dict:
return json.loads(self.body)
def __str__(self) -> str:
return self.body
def __repr__(self) -> str:
return f"<Response {self.status}>"
Methods
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
Release files for recuests 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| recuests-1.0.tar.gz | 5.8 kB | Details |
Release files / recuests-1.0.tar.gz
| Download URL | recuests-1.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1a50931bf4ee923c74908e328e833258ec23869060923e69c8dae5dbc75ecd9
|
|
BLAKE2b-256 checksum How to use checksums |
0e60ce711cf7666fb473863aea08cc054418084b4c4ebc90f48341b0d6e079dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|