httpbin
HTTP Request and Response Service
What it is and what it does
httpbin is a Flask-based service that exposes HTTP endpoints for testing and debugging HTTP clients. It was originally created by Kenneth Reitz and is now maintained as a fork by the Python community after the original became unmaintained. The package can be deployed as a standalone Docker container or used directly as a library in Python projects.
When used as a library, httpbin provides a Flask application object that can be integrated into test suites or development environments. It includes endpoints for testing various HTTP scenarios: response codes, redirects, delays, byte streams, digest authentication, and more. The package depends on Flask, werkzeug, greenlet, decorator, brotlicffi, six, and importlib-metadata. Recent releases have made flasgger optional and fixed Python 3.12+ compatibility issues.
Use it for:
- Test HTTP client libraries like requests by making real HTTP calls to a local or remote httpbin instance.
- Debug HTTP request/response behavior during development without needing a real backend service.
- Verify authentication flows (digest auth, basic auth) in HTTP clients before integration.
- Simulate network conditions like delays, redirects, and byte streaming for stress testing.
- Validate error handling by requesting specific HTTP status codes and response formats.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
httpbin is a Flask-based HTTP request and response service that provides endpoints for testing and debugging HTTP clients and libraries.
Yes. httpbin is actively maintained, has no known vulnerabilities, and is widely used in the Python ecosystem (pytest-httpbin, requests). Install friction is low and it supports current Python versions (3.8–3.14). Use it as a library for HTTP client testing or deploy the Docker image as a standalone service.
Install
httpbin on PyPI
pip
pip install httpbinuv
uv add httpbinpoetry
poetry add httpbinInstalling httpbin
Before you install
Low install friction with a wheel distribution and seven runtime dependencies. Actively maintained as of 2026-06-16 with recent fixes for Python 3.12+ compatibility and dependency cleanup.
License in practice
Dual-licensed under MIT or ISC (both permissive). No restrictions on commercial or private use.
Quickstart
pip install httpbin
from httpbin import app
from flask import Flask
# Use the Flask app directly in tests or as a WSGI application
if __name__ == '__main__':
app.run()
Requires Python 3.8 or later. The Flask framework and its dependencies (werkzeug, greenlet) must be available.
Verify before relying
- Whether the package is intended primarily as a library dependency or as a standalone service to be run separately.
- What specific HTTP testing scenarios each endpoint (/bytes, /delay, /redirect-to, /drip, etc.) is designed to cover.
- Performance characteristics or concurrency limits when used as a library in test suites.
Package facts
| License | MIT or ISC (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — brotlicffi, decorator, flask, greenlet, importlib-metadata, six, werkzeug |
| Maintenance | actively maintained — 59 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 493,841/month — #6,354 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: httpbin-0.10.4-py2.py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-httpbinProvides a pytest fixture that runs a local…
permissive · top 15,000 on PyPI
pookpook intercepts and mocks HTTP traffic for…
permissive · top 15,000 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
Flask-HTTPAuthAdds HTTP Basic, Digest, and Token…
permissive · top 5,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
invenio-restInvenio-REST provides Flask-based REST API…
permissive · top 15,000 on PyPI
Flask-BasicAuthFlask-BasicAuth adds HTTP basic access…
permissive · top 15,000 on PyPI
WebObWebOb provides request and response objects…
permissive · top 5,000 on PyPI
requests-futuresWraps the requests library to execute HTTP…
permissive · top 5,000 on PyPI