Skip to main content

🍵 Tea

Micro HTTP library for Python.

Tea has Express.js-like syntax (which is web framework for JavaScript) with it's callback function syntax, Request, Response and URL objects. Got a lot of reference from popular web frameweorks like Flask, FastAPI and Express.js. Tea is like lightweight mix of their best features.

Finally, the 418 I am a teapot code comes true. Enjoy!

Quick Start

$ pip install tea-web

Hello, World!

Simple Hello, World! example in Tea. See /examples for more example.

# app.py
from tea import Tea

app = Tea()

def handle_index(req, res):
    res.send("Hello, World!")

app.get("/", handle_index)

app.listen() # listening port 8080

Pros

  • Lightweight. No external requirement and the package cost is only ~10 KB.
  • More control over the Request and Response objects. This objects can be used outside the library structure.
  • Easy to use and helpful on handling simple HTTP requests.

Cons

  • Limited features and methods.
  • No template engine.
  • Callback function syntax is not really Pythonic without decorators. (Done on purpose but true.)
  • Not sure if it's ready for production.

Documentation

License

Metadata

Release files for tea-web 0.6.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 tea-web 0.6.0
File Size Uploaded Provenance
tea-web-0.6.0.tar.gz 10.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tea-web 0.6.0
File Interpreter ABI Platform
tea_web-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / tea-web-0.6.0.tar.gz

Download URL tea-web-0.6.0.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
393af712f2587b607c88374771b76cb4e598d3a7b4a81a8528bf21647e4d20e8
BLAKE2b-256 checksum
How to use checksums
2195ee7186b4e7be2026c57434eb1cbfc4cac51e0687bb0f849e298d2a6ab52a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.2

Release files / tea_web-0.6.0-py3-none-any.whl

Download URL tea_web-0.6.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fd4e3ab01e3c69866db83dec52764be1559981755135d54ea02169ba0ab1e82
BLAKE2b-256 checksum
How to use checksums
03a1e5be1b7637a997a0d7f857c08043c6b24e71dac8fe47b3b55d16860027a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.2

Security for tea-web 0.6.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.

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