Cocopot is a fast, simple and lightweight WSGI micro web-framework for Python. It provide similar interface with Flask. It's intended for focus on mobile service development, which not handle html rendering
- Routing: Requests to function-call mapping with support for clean and dynamic URLs.
- No built-in Templates
- Utilities: Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.
from cocopot import Cocopot
app = Cocopot()
@app.route("/hello")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
Run this script or paste it into a Python console, then point your browser to <http://localhost:8080/hello>
. That's it.
Install the latest stable release with pip install cocopot
, easy_install -U cocopot
. There are no hard dependencies other than the Python standard library. Cocopot runs with Python 2.6+ and 3.3+.
Read the Documentation online.
Code and documentation are available according to the BSD License (see LICENSE).