🍾

Bottle Hello World

安装 Bottle,编写首个路由,启动开发服务器并测试基本端点。快速、直指要点。

python-frameworks web-development

Tutorial Progress

Step 1 of 11

1 What is Bottle?

Bottle is a lightweight, single-file web framework for Python. It has a built‑in HTTP server, a simple routing system, templating, utilities for cookies, headers, and form data. Think of it as a Swiss Army knife that fits in your pocket—no heavyweight dependencies.

  • Single‑file framework
  • Built‑in WSGI server
  • Routes, request/response helpers, and templating
  • Great for microservices, API endpoints, and quick demos

Next, we’ll install Bottle and run a tiny app in under a minute.