This release is a pre-release and may not be stable for production use.
☕ CoffeePot
CoffeePot is a fun, quirky Python module and server that lets you brew coffee (and other drinks) via HTTP, CLI, or directly in Python code. Inspired by the HTCPCP “Hyper Text Coffee Pot Control Protocol,” CoffeePot is perfect for programmers who want a cozy, playful local server.
Features
- Start a local CoffeeServer with a cozy default HTML page.
- BREW endpoint simulating different types of drinks:
coffee,espresso,latte,mocha,tea,hot chocolate.
- Each drink type can have unique effects (strength, aroma, mood).
- Flexible routing using HTTP methods:
GET /brew→ pull a coffee safelyBREW /brew→ full HTCPCP brewPOST /latte,PUT /mocha,PATCH /tea,BREW /hot-chocolate
- Fully programmatic API: use
brew()andrun()in Python scripts. - Fun ASCII art and cozy startup messages in the terminal.
Installation
git clone https://github.com/DevHollo/CoffeePot.git
cd CoffeePot
pip install -e .
This installs CoffeePot in editable mode so you can modify it while developing.
Via pip:
pip install coffeepot-http
CLI Usage
Start the server:
python -m coffeepot.cli serve --port 2615
- Opens
http://127.0.0.1:2615/with the default cozy homepage. - Try:
curl -X BREW http://127.0.0.1:2615/brew
curl http://127.0.0.1:2615/brew?type=espresso
Brew a coffee from CLI:
python -m coffeepot.cli brew --type latte
Programmatic Usage
from CoffeePot import brew, run
# Brew an espresso programmatically
coffee = brew("espresso")
print(coffee)
# Start CoffeeServer programmatically
run(port=2615)
Sample output from brew("latte"):
{
"status": "ready",
"message": "Your latte is brewed!",
"strength": 4,
"aroma": "milky"
}
Custom HTML
You can provide a custom HTML page for the server:
python -m CoffeePot.cli serve --html mypage.html
/and/index.htmlwill serve your custom page.- All brew routes continue to work normally.
Extend CoffeePot
- Add new drink types with unique effects in
brew.py. - Register new routes with
@CoffeeServer.route("/drink", method="POST"). - Customize HTML, ASCII art, or responses to make your CoffeePot truly yours.
Fun Facts
- Default server port is
☕(U+2615, decimal 9749). - Full HTCPCP-inspired methods make your API feel like a real coffee machine.
- Cozy ASCII art makes even a 404 error a bit more charming.
License
MIT License. Feel free to brew, share, and fork!
Metadata
Release files for coffeepot-http 0.0.1a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| coffeepot_http-0.0.1a1.tar.gz | 10.8 kB | Without provenance | Details for coffeepot_http-0.0.1a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| coffeepot_http-0.0.1a1-py3-none-any.whl | Python 3 | none | any | Details for coffeepot_http-0.0.1a1-py3-none-any.whl |
Total release size: 21.4 kB
Release files / coffeepot_http-0.0.1a1.tar.gz
| Download URL | coffeepot_http-0.0.1a1.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
345104da99c46da0a4323b067875f0139ebaaa98de1175f3ac57280e1df11843
|
|
BLAKE2b-256 checksum How to use checksums |
6e2a66c97c3ce47bb6d3fa545792a14d536b3594df4e4864325bad10b7c71288
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / coffeepot_http-0.0.1a1-py3-none-any.whl
| Download URL | coffeepot_http-0.0.1a1-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d4cfa75fa4d0943148864172232448e3a99adb6f3e0f2607aa9d802ac4a23c6
|
|
BLAKE2b-256 checksum How to use checksums |
16e2047c5da5eb5ea42182731029a461ad8d183fec26113b04e2b54217131970
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for coffeepot-http 0.0.1a1
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.