Skip to main content

httpbin(1): HTTP Request & Response Service

This is a fork of the original httpbin project, which is located at https://github.com/postmanlabs/httpbin

Why fork? we were unable to get ahold of the folks at postmanlabs to maintain the original project, and httpbin is used for other packages within the python ecosystem, such as pytest-httpbin which is in turn used by packages such as requests so we have forked this package. That means that httpbin.org is not actually backed by this repo, but the httpbin package is. Confusing right? Know anyone at postmanlabs? get in touch.

httpbin is a Kenneth Reitz Project. ice cream

Downloading and Running

docker pull ghcr.io/psf/httpbin
docker run -p 80:8080 ghcr.io/psf/httpbin

Using httpbin as a Library

httpbin can be used as a dependency in your own projects by simply adding httpbin as a dependency.

Manually Building the Latest Docker Image

To build the Docker image yourself, download the latest Dockerfile and requirements.txt files from the release page. Store both file in the same folder and run:

docker build --build-arg APP_VERSION=<your-version> [other docker args] .

Alternatively, you can re-generate a new requirements.txt file using pip-compile. In that case, be aware that the code has not been tested against those dependencies and we cannot guarantee that such an image will run without errors.

Where APP_VERSION will be stored in a docker-label. The default value is an empty-string.

Maintenance

"Extra" Dependencies

The project provides two "extras" which contain dependencies that should only be installed for specific use-cases. They will not be included when using httpbin as a dependency, unless they are explicitly requested like httpbin[mainapp].

  • mainapp: Includes everything needed to run httpbin as a standalone app. This is used by the docker image.
  • test: Includes additional dependencies for unit-testing. This is only used during development.

Publishing a new Release

Releases (both docker and pypi) are automated via GitHub Actions (See #17).

For pypi releases, the project uses trusted-publishing via the official GitHub action.

For releases on docker-hub (when enabled in the CI), the following two secrets are required:

  • DOCKERHUB_USERNAME
  • DOCKERHUB_TOKEN

Releases are triggered on commits tagged with release- (for example release-0.10.0).

Changelog

  • 0.10.4:
    • Made flasgger an optional dependency (falls back to a static landing page when absent), thanks @AdamWill and @mgorny
    • Fixed invalid escape sequence SyntaxWarnings on Python 3.12+, thanks @hseg
    • Included tox.ini and the tests in the source distribution, thanks @Mirochill
    • Added Python 3.13 and 3.14 to the test matrix and classifiers
  • 0.10.3:
    • Fixed the /bytes endpoint to return bytes (not bytearray) for WSGI compliance with newer Werkzeug, thanks @swt2c
    • Dropped support for Python 3.7
    • Build and publish arm64 Docker images
  • 0.10.2:
    • Added support for Flask 3.0
  • 0.10.1:
    • Substantial housekeeping, dependency cleanup, image building, and packaging revamp, thanks to @exhuma and @mgorny
  • 0.10.0:
    • Override docker image port with HTTPBIN_PORT
    • A number of fixes for code rot, thanks @mgorny and @tjni
  • 0.9.2: ??? (never published as a package; seems to be internal to postman)
  • 0.7.0: ???
  • 0.6.2: ???
  • 0.6.0: ???
  • 0.5.0
    • Allow /redirect-to to work with multiple methods
    • Allow MD5 or SHA-256 to be chosen as algorithms for HTTP Digest Auth
    • Set a 10MB limit on /drip
  • 0.4.1: Added floating-point support for /delay endpoint
  • 0.4.0: New /image/svg endpoint, add deploy to heroku button, add 406 response to /image, and don’t always emit the transfer-encoding header for stream endpoint.
  • 0.3.0 A number of new features, including a /range endpoint, lots of bugfixes, and a /encoding/utf8 endpoint
  • 0.2.0: Added an XML endpoint. Also fixes several bugs with unicode, CORS headers, digest auth, and more.
  • 0.1.2: Fix a couple Python3 bugs with the random byte endpoints, fix a bug when uploading files without a Content-Type header set.
  • 0.1.1: Added templates as data in setup.py
  • 0.1.0: Added python3 support and (re)publish on PyPI

Officially Deployed (but out of date) at:

SEE ALSO

Metadata

Release files for httpbin 0.10.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for httpbin 0.10.4
File Size Uploaded Provenance
httpbin-0.10.4.tar.gz 109.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for httpbin 0.10.4
File Interpreter ABI Platform
httpbin-0.10.4-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 210.0 kB

Release files / httpbin-0.10.4.tar.gz

Download URL httpbin-0.10.4.tar.gz
Size 109.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6023a5a2e8fb8e91abdd6d34d1f1f455092f97d567c25600e1b48ee1178aa738
BLAKE2b-256 checksum
How to use checksums
abd608055226e3ee2545fa5c38b157bd0fdb111ad6609450d5dbe186800d25bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.

Transparency log

Release files / httpbin-0.10.4-py2.py3-none-any.whl

Download URL httpbin-0.10.4-py2.py3-none-any.whl
Size 100.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
71862093f371c3a39cfcdcd2f073aaf610b6433f9d4c0130248e676453fca65d
BLAKE2b-256 checksum
How to use checksums
e539e9fc7334c69f82c307ae861e13704437d31b71514d273061e08db5830b92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.

Transparency log

Security for httpbin 0.10.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for httpbin-0.10.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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