Bottle is a fast, simple, lightweight Python WSGI WEB framework. Single file, relying only on the Python standard library. Bottle is good for people who have a bit of a python base, because it's easy to use, as long as you have a basic Python syntax and a bit of web knowledge, you can develop a great web. Learning Python's OPS staff, do not need the Django framework, can be operational tools, after all, Django learning, more complex, long study time, we need to use Django it?
URL mapping (Routing): map URL requests to Python functions to make the URLs more concise.
Template (Templates): a fast and pythonic built-in template engine that supports templates such as Mako, JINJA2, and Cheetah.
Basic functionality (Utilities): easy access to form data, uploading files, using cookies, viewing HTTP metadata.
Development Server (server): built-in development server with support for paste, FAPWS3, Bjoern, Google App Engine,cherrypy and other WSGI-compliant HTTP servers.
Example : "Hello World"
From bottle import route, Run@route ('/hello/:name ') def index (name= "World"): Return ' <b>hello%s!</b> '% nam Erun (host= ' localhost ', port=8080)
Save it as a py file and execute it, and you can see the effect by accessing Http://localhost:8080/hello/world in your browser. It's so simple.
Single!
Introduction to the Python Bottle web framework