Skip to main content

Simple HTTP library for web applications written in Python.

Project description

♨️ Tea

Simple HTTP library for web applications written in Python.

Tea is more similar to Express.js-like syntax (which is web framework for JavaScript) than Flask-like syntax. Fun fact: Developer thinks it is better.

Quick Start

$ pip install tea-web

Hello, World!

Simple Hello, World! example in Tea and equivalents in Flask and Express.js. See /examples for more example.

Tea

# app.py
from tea import Tea
app = Tea()
def handle_index(req, res):
    res.send("Hello, World!")
app.get("/", handle_index)
app.listen(port=8080)

Flask

# app.py
from flask import Flask
app = Flask(__name__)
@app.route("/", methods=["GET"])
def handle_index():
    return "Hello, World!"
app.run(port=8080)

Express.js

// app.js
import express from "express";
const app = express();
app.get("/", (req, res) => {
    res.send("Hello, World!");
});
app.listen(8080);

Documentation

License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tea-web-0.0.3.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

tea_web-0.0.3-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page