Skip to main content

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)

Source distribution for recuests 1.0
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

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page