Registry / http-networking / httpdbg

httpdbg

JSON →
library2.1.7pypypi✓ verified 83d ago

httpdbg is a simple Python tool designed to debug HTTP(S) client and server requests. It functions as a local proxy, capturing and displaying all outgoing and incoming HTTP traffic in a user-friendly web interface. Currently at version 2.1.6, it receives regular updates for bug fixes and minor feature enhancements, maintaining active development.

pip install httpdbg
INSTALL
IMPORT
SIG · HTTPDBG
H
httpdbg
http-networkingpythonv2.1.7
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.4MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

httpdbg
import httpdbg
from httpdbg import httpdbg

This quickstart demonstrates how to programmatically start and stop the httpdbg proxy, and then make a simple HTTP request using the `requests` library, ensuring it routes through the proxy for debugging. The environment variables are set to help other libraries (like `httpx`) automatically pick up the proxy.

import requests from httpdbg import httpdbg import os # Start the httpdbg proxy httpdbg.start() print(f"httpdbg UI available at: http://127.0.0.1:{httpdbg.port}") # Configure requests to use the proxy proxies = { 'http': f'http://127.0.0.1:{httpdbg.port}', 'https': f'http://127.0.0.1:{httpdbg.port}' } os.environ['HTTP_PROXY'] = proxies['http'] # For clients that respect env vars os.environ['HTTPS_PROXY'] = proxies['https'] try: # Make an HTTP request that will be captured print("Making a request...") response = requests.get('http://httpbin.org/get', proxies=proxies, timeout=5) response.raise_for_status() print(f"Request successful: {response.status_code}") print("Check the httpdbg UI for captured request details.") except requests.exceptions.RequestException as e: print(f"Request failed: {e}") finally: # Stop the httpdbg proxy httpdbg.stop() print("httpdbg stopped.") # Clean up environment variables del os.environ['HTTP_PROXY'] del os.environ['HTTPS_PROXY']
httpdbg --version
Debug
Known issues
breakingVersion 2.0.0 introduced HTTP/2 support. While largely compatible, this major version bump could introduce subtle behavioral changes for applications or test suites that implicitly relied on HTTP/1.x characteristics or specific internal proxy behaviors. Always test thoroughly when upgrading to v2.0.0 or later.
fix
Review existing HTTP client configurations and test suites, especially those interacting with HTTP/2 endpoints, for unexpected behavior. Consult httpdbg documentation for any new configuration options related to HTTP/2.
affects: >=2.0.0
gotchaRequests are not appearing in the httpdbg UI because your application is not using the proxy.
fix
Ensure your HTTP client (e.g., `requests`, `httpx`, `urllib`) is explicitly configured to use the `httpdbg` proxy. This often involves setting `HTTP_PROXY` and `HTTPS_PROXY` environment variables to `http://127.0.0.1:5000` (or your chosen port), or passing a `proxies` dictionary to the client functions/sessions.
affects: All
gotchaThe default port (5000) used by httpdbg is already in use, causing startup failures.
fix
If you encounter an 'Address already in use' error, start `httpdbg` on an alternative port, e.g., `httpdbg.start(port=8000)`. You will then need to configure your client to use this new port for the proxy.
affects: All
Upgrade
Version history
2.1.7latest on PyPI · released May 1, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
2
Resources
httpdbg — pip install httpdbg · libregistry