Skip to main content

lightreq

pipeline coverage

A lightweight, composable HTTP client for Python built around the chain-of-responsibility pattern

Installation

pip install lightreq

Usage

from src.client import HttpClient
from src.middleware import logging, retry

client = HttpClient(
    adapter="requests",
    middleware=[logging(), retry(retries=3)]
)

response = client.get(url="https://jsonplaceholder.typicode.com/todos/1")
print(response.is_ok())     # True
print(response.json())      # {'userId': 1, 'id': 1, ...}

client.close()

Documentation

Full documentation is available at lightreq.readthedocs.io

Release files for lightreq 0.2.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 lightreq 0.2.0
File Size Uploaded
lightreq-0.2.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lightreq 0.2.0
File Interpreter ABI Platform
lightreq-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / lightreq-0.2.0.tar.gz

Download URL lightreq-0.2.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f8ffa29f236bf66995b34ddb760f64742782b856ce03c52be31fac8a2f1556a5
BLAKE2b-256 checksum
How to use checksums
5a51008748e8678c59a596c0bda1492ed820e182f30e8cc539350cf22b10464e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / lightreq-0.2.0-py3-none-any.whl

Download URL lightreq-0.2.0-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
651fc4aadfb80bc60ee37cc3c641e2c783603a78147b9b9e991894d8b331a1c4
BLAKE2b-256 checksum
How to use checksums
8943e4b3463d623de72a8d8e1b6d73f582dc21fc5c316148c8aad82b4b03507d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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