-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #583 from ramnes/master
Consistent README, year 2014
- Loading branch information
Showing
4 changed files
with
50 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,61 @@ | ||
Bottle Web Framework | ||
==================== | ||
|
||
.. image:: http://bottlepy.org/docs/dev/_static/logo_nav.png | ||
:alt: Bottle Logo | ||
:align: right | ||
|
||
Bottle is a fast and simple micro-framework for small web applications. It | ||
offers request dispatching (URL routing) with URL parameter support, templates, | ||
a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and | ||
template engines - all in a single file and with no dependencies other than the | ||
Python Standard Library. | ||
.. _mako: http://www.makotemplates.org/ | ||
.. _cheetah: http://www.cheetahtemplate.org/ | ||
.. _jinja2: http://jinja.pocoo.org/ | ||
.. _paste: http://pythonpaste.org/ | ||
.. _fapws3: https://github.com/william-os4y/fapws3 | ||
.. _bjoern: https://github.com/jonashaag/bjoern | ||
.. _cherrypy: http://www.cherrypy.org/ | ||
.. _WSGI: http://www.wsgi.org/ | ||
.. _Python: http://python.org/ | ||
|
||
Homepage and documentation: http://bottlepy.org/ | ||
License: MIT (see LICENSE) | ||
============================ | ||
Bottle: Python Web Framework | ||
============================ | ||
|
||
Installation and Dependencies | ||
----------------------------- | ||
Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_. It is distributed as a single file module and has no dependencies other than the `Python Standard Library <http://docs.python.org/library/>`_. | ||
|
||
Install bottle with ``pip install bottle`` or just `download bottle.py <http://pypi.python.org/pypi/bottle>`_ and place it in your project directory. There are no (hard) dependencies other than the Python Standard Library. | ||
|
||
* **Routing:** Requests to function-call mapping with support for clean and dynamic URLs. | ||
* **Templates:** Fast and pythonic `*built-in template engine* <http://bottlepy.org/docs/dev/tutorial.html#tutorial-templates>`_ and support for mako_, jinja2_ and cheetah_ templates. | ||
* **Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata. | ||
* **Server:** Built-in HTTP development server and support for paste_, fapws3_, bjoern_, `Google App Engine <http://code.google.com/intl/en-US/appengine/>`_, cherrypy_ or any other WSGI_ capable HTTP server. | ||
|
||
Example | ||
------- | ||
Homepage and documentation: http://bottlepy.org | ||
|
||
|
||
Example: "Hello World" in a bottle | ||
---------------------------------- | ||
|
||
.. code-block:: python | ||
from bottle import route, run | ||
from bottle import route, run, template | ||
@route('/hello/<name>') | ||
def index(name): | ||
return template('<b>Hello {{name}}</b>!', name=name) | ||
run(host='localhost', port=8080) | ||
Run this script or paste it into a Python console, then point your browser to `<http://localhost:8080/hello/world>`_. That's it. | ||
|
||
|
||
Download and Install | ||
-------------------- | ||
|
||
.. __: https://github.com/defnull/bottle/raw/master/bottle.py | ||
|
||
Install the latest stable release with ``pip install bottle``, ``easy_install -U bottle`` or download `bottle.py`__ (unstable) into your project directory. There are no hard dependencies other than the Python standard library. Bottle runs with **Python 2.5+ and 3.x**. | ||
|
||
|
||
License | ||
------- | ||
|
||
.. __: https://github.com/defnull/bottle/raw/master/LICENSE | ||
|
||
@route('/hello/<name>') | ||
def hello(name): | ||
return '<h1>Hello %s!</h1>' % name.title() | ||
Code and documentation are available according to the MIT License (see LICENSE__). | ||
|
||
run(host='localhost', port=8080) | ||
The Bottle logo however is *NOT* covered by that license. It is allowed to use the logo as a link to the bottle homepage or in direct context with the unmodified library. In all other cases please ask first. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters