Skip to main content

django-htcpcp

PyPI CI

Django middleware implementing the HyperText Coffee Pot Control Protocol (HTCPCP), as specified in RFC 2324 and extended by RFC 7168.

Request Response
BREW to a coffee pot 202 Accepted — "Say WHEN"
WHEN to a coffee pot 201 Created — coffee!
BREW/WHEN anywhere else 418 I'm a teapot
Anything else Passed through untouched

Requirements

  • Python 3.10+
  • Django 4.2+

Installation

pip install django-htcpcp

Add the middleware to your settings:

MIDDLEWARE = [
    # ...
    "djhtcpcp.middleware.HTCPCPMiddleware",
]

Adding "djhtcpcp" to INSTALLED_APPS is optional.

The middleware works under both WSGI and ASGI.

Configuration

By default /coffee/black/ and /coffee/espresso/ are coffee pots. Override them with:

HTCPCP_COFFEE_PATHS = ["/kitchen/pot-1/", "/kitchen/pot-2/"]

Try it

curl -i -X BREW http://localhost:8000/coffee/black/
curl -i -X BREW http://localhost:8000/tea/earl-grey/

Development

uv run pytest
uv run ruff check .

Metadata

Release files for django-htcpcp 0.3.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 django-htcpcp 0.3.0
File Size Uploaded Provenance Actions
django_htcpcp-0.3.0.tar.gz 4.3 kB Without provenance Details for django_htcpcp-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-htcpcp 0.3.0
File Interpreter ABI Platform Actions
django_htcpcp-0.3.0-py3-none-any.whl Python 3 none any Details for django_htcpcp-0.3.0-py3-none-any.whl

Total release size: 8.1 kB

Release files / django_htcpcp-0.3.0.tar.gz

Download URL django_htcpcp-0.3.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
38cd031d5a67b4e6f57c40b1730021242710038568fce6984891c1542c33d23b
BLAKE2b-256 checksum
How to use checksums
2e62ac81880effec7afe87f1465fe7c8102e2b722840fb05f210d52b9d231066
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / django_htcpcp-0.3.0-py3-none-any.whl

Download URL django_htcpcp-0.3.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bd862885ee2ba9bc155e8a89576d27ad1dc7823dbe50d643a61e252bc0cb4f1
BLAKE2b-256 checksum
How to use checksums
c49ef4bcc6a11bc4e4fd5a959dde75e2053f04ca213689a1252a8ab9c7c08388
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for django-htcpcp 0.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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