Bottle (web framework)
| File:Bottle logo.png | |
| Original author(s) | Marcel Hellkamp |
|---|---|
| Developer(s) | Bottle is written and maintained by Marcel Hellkamp[1] |
| Repository | github |
| Written in | Python[1] |
| Engine | |
| Type | Web framework[1] |
| License | MIT |
| Website | bottlepy |
Search Bottle (web framework) on Amazon.
Bottle is a fast, simple and lightweight WSGI web microframework written in Python.[2] It is distributed as a single file module and has no dependencies other than the Python Standard Library.[3]
It offers request dispatching (routes) with URL parameter support, templates, a built-in web server and adapters for many third-party WSGI/HTTP server and template engines. It is designed to be lightweight and to allow development of web applications easily and quickly.
History
Bottle[4] is a web microframework[5] designed for prototyping and building small web applications and services.[6][7][8][9][10][11] It stays out of your way and allows you to get things done fast, but misses some advanced features and ready-to-use solutions found in other frameworks (MVC, ORM, Form validation, Scaffolding, XML-RPC). Although it is possible to add these features and build complex applications with Bottle[12], you should consider using a full-stack web framework like Pylons Framework or Python Paste instead.[13]
Components
An advantage of Bottle is that its small profile makes it easy to embed it within a larger application without worrying about system-wide dependencies.[14]
Routing
Requests to function-call mapping with support for clean and dynamic URLs.
Templates
Fast and pythonic built-in template engine[15] 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 Python Paste, bjoern, Google App Engine, CherryPy or any other WSGI capable HTTP server.
Plugins
There are available third-party plugins[16] that add extend Bottle's core functionality or integrate other libraries with the Bottle microframework. Available third-party plugins are developed and maintained by third parties.[17]
Example
The following code shows a simple web application that displays "Hello World!" when visited:[18]
from bottle import Bottle, run
app = Bottle()
@app.route('/')
def hello():
return "Hello World!"
run(app, host='localhost', port=8080)
See also
- Django (web framework)
- Flask (web framework)
- FastAPI
- Pylons project
- Web2py
- Tornado
- Comparison of web frameworks
References
- ↑ 1.0 1.1 1.2 "bottle/AUTHORS". GitHub. Retrieved 2022-09-09.
- ↑ "Popular Non Full-Stack Frameworks". Retrieved 2022-09-09.
- ↑ "Bottle website". 2022-09-09. Retrieved 2022-09-09.
- ↑ "An Introduction to Python Frameworks – Part 1". 2022-09-09. Retrieved 2022-09-09.
- ↑ "Applications for Python". 2022-09-09. Retrieved 2022-09-09.
- ↑ "Building a Rest API with the Bottle Framework". 2022-09-09. Retrieved 2022-09-09.
- ↑ "Creating Bar Chart Visuals with Bokeh, Bottle and Python 3". 2017-07-25. Retrieved 2022-09-09.
- ↑ "Dialing Outbound Phone Calls with a Bottle Web App". 2016-08-30. Retrieved 2022-09-09.
- ↑ "How To Use the Bottle Micro Framework to Develop Python Web Apps". 2013-12-14. Retrieved 2022-09-09.
- ↑ First Steps with Python & Bottle. 2016-11-22. Retrieved 2022-09-09.
- ↑ Matt Makai (2016-08-05). "Getting Started with Python, Bottle and Twilio SMS / MMS". Retrieved 2022-09-09.
- ↑ Pretty Printed (2016-02-29). An Introduction to the Bottle Web Framework for Python. Retrieved 2022-09-09.
- ↑ "FAQ". 2022-09-09. Retrieved 2022-09-09.
- ↑ "An Introduction to Python Frameworks". 2022-09-09. Retrieved 2022-09-09.
- ↑ "Built-in template engine".
- ↑ "List of available plugins". 2022-09-09. Retrieved 2022-09-09.
- ↑ List of available plugins (PDF). 2022-09-09. Retrieved 2022-09-09. Search this book on
- ↑ "Quickstart: "Hello World"". Retrieved 2022-09-09.
Bibliography
- Carlos, de la Guardia (March 2016), Python Web Frameworks (1st ed.), O'Reilly Media, Inc., ISBN 9781491938096
- Barguzar, Abdulwahid Abdulhaque (2018), Building Serverless Python Web Services with Zappa: Build and deploy serverless applications on AWS using Zappa (1st ed.), Packt Publishing Ltd, p. 324, ISBN 9781788837613
- Galbraith, John (2022), Network Programming in Python: The Basic: A Detailed Guide to Python 3 Network Programming and Management (English Edition) (1st ed.), BPB Publications, India, p. 521, ISBN 9789355512574
External links
This article "Bottle (web framework)" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Bottle (web framework). Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.
