v1.0 is live
Changelog

The HTTP clientPython deserves.

Unified sync / async requests, chainable interceptors, exponential-backoff retries, and 100 % strict type hints — in one elegant package.

Start building
api_client.py
import axios_python
# Create a reusable, configured client
api = axios_python.create({
    "base_url":    "https://api.github.com",
    "timeout":     5.0,
    "max_retries": 3,
})

# Identical API surface for sync & async
async def get_repos(username: str) -> list:
    resp = await api.async_get(f"/users/{username}/repos")
    resp.raise_for_status()
    return resp.json()

# Middleware: attach auth on every request
api.use(lambda req: req.set_header(
    "Authorization", f"Bearer {TOKEN}"
))
Python 3.10+httpxfully typed

Before & after

Less boilerplate. More flow.

Before
import httpx, asyncio, time

async def fetch(url, retries=3):
    for i in range(retries):
        try:
            async with httpx.AsyncClient() as c:
                r = await c.get(url, timeout=5)
                r.raise_for_status()
                return r.json()
        except Exception:
            time.sleep(2 ** i)
    raise RuntimeError("Failed")
✦ axios_python
import axios_python

api = axios_python.create({
    "base_url":    "https://api.github.com",
    "timeout":     5.0,
    "max_retries": 3,
})

async def fetch(path):
    r = await api.async_get(path)
    r.raise_for_status()
    return r.json()

Features

Everything you need, nothing you don't.

Middleware Pipeline

Express-style middleware lets you log, mutate, or short-circuit any request or response in a clean chainable API.

Smart Retries

Exponential backoff with jitter out of the box. Configure per-client or per-request — no extra libraries needed.

Strictly Typed

100 % strict mypy coverage. Flawless auto-completion in VS Code, PyCharm, and beyond. Ship with confidence.

Unified Interface

One API for sync and async. Switch from requests to asyncio without rewriting a single line of business logic.

Instance Inheritance

Fork a base client to create scoped instances that inherit config, headers, and middleware from the parent.

Secure by Default

Certificate verification on, redirects followed safely, sensitive header stripping on cross-origin redirects.

Get started

Ship your first request
in under 60 seconds.

Zero config required. pip install and you're off.