156 captures
12 Jun 2014 - 28 Jan 2026
Oct NOV Dec
18
2020 2021 2022
success
fail

About this capture

COLLECTED BY

Collection: Save Page Now Outlinks

TIMESTAMPS

The Wayback Machine - http://web.archive.org/web/20211118093845/https://www.fullstackpython.com/bottle.html
 

Full Stack Python logoFull Stack Python
All topics | Blog | Supporter's Edition | @fullstackpython | Facebook | What's new?

Bottle






Bottle (source code) is a WSGI-compliant single source file web framework with no external dependencies other than the Python standard library (stdlib).

Official Bottle logo.

Should I use Bottle for web development?


Bottle is awesome for a few web development situations:


(一)Prototyping ideas 

(二)Learning how web frameworks are built

(三)Building and running simple personal web applications 

Prototyping


Prototyping simple ideas is often easier with Bottle than a more opinionated web framework like Django because Django projects start with a significant amount of boilerplate code. The Model-View-Template structure for Django apps within projects makes maintaining projects easier, but it can be cumbersome on starter projects where you're just playing with random ideas so you aren't worried about your application's long-term code structure.

Learning about frameworks


Bottle is contained within a single large source file named bottle.py so it provides great reading when learning how WSGI web frameworks work. Everything you need to learn about how your web application's code connects with the Bottle framework is contained within that single source code.

Personal projects


Personal projects can be deployed with Bottle as the only dependency. If you've never performed a Python web app deployment before, the number of concepts and steps can be daunting. By packaging bottle.py with your app's source code, you can skip some of the steps to more easily get your web application up and running. 

Bottle is an implementation of the web frameworks concept. Learn how these pieces fit together in the web development chapter or view the table of contents for all topics.

Bottle resources




Configuring Python 3, Bottle and Gunicorn for Development on Ubuntu 16.04 LTS is a quick tutorial for getting an out-of-the-box default Ubuntu 16.04 image ready for Bottle development with Green Unicorn as the WSGI server.



Check out these Full Stack Python Bottle tutorials that'll teach you how to write a few small but very useful Bottle web apps:


Creating Bar Chart Visuals with Bokeh, Bottle and Python 3

Dialing Outbound Phone Calls with a Bottle Web App

How to Monitor Python / Bottle Web Apps

Replying to SMS Text Messages with Python and Bottle




Digital Ocean provides an extensive introductory post on Bottle.



First Steps with Python and Bottle is a quick 4 minute introduction that I created for developers so they can get the simplest possible Bottle web app running. There is also a companion blog post with the code.



Getting Started with Python, Bottle and Twilio SMS / MMS shows how to build a simple Bottle web application that can send and receive text and picture messages. How to Make and Receive Phone Calls with Python, Bottle and Twilio Voice is a similar beginner's tutorial for handling phone calls with a Bottle app using Twilio.



Developing With Bottle details how to create a basic application with Bottle.



The official Bottle tutorial provides a thorough view of basic concepts and features for the framework.



Running a Bottle app with Gunicorn shows how to execute a simple Bottle web app with Green Unicorn.



Here's a short code snippet for creating a RESTful API with Bottle and MongoDB.



Bottle, full stack without Django does a nice job of connecting SQLAlchemy with Bottle and building an example application using the framework.



Using bottle.py in Production has some good tips on deploying a Bottle app to a production environment.



Jinja2 Templates and Bottle shows how to use Jinja instead of the built-in templating engine for Bottle page rendering.



Python patterns contains a setup that combines Bottle, Celery and Peewee as the developer's choice for backend web development. The developer also uses Vim as the primary editor for working with Bottle.


Open source Bottle example projects




Pattle is a pastebin clone built with Bottle.



Decanter is a library for structuring Bottle projects.



compare-python-web-frameworks provides an example application using Bottle as one of the implementations.


Bottle framework learning checklist




Download Bottle or install via pip with pip install bottle on your local development machine.



Work through the official Bottle tutorial.



Start coding your Bottle app based on what you learned in the official tutorial plus reading open source example applications found above.



Move on to the deployment section to get your initial Bottle application on the web.


What do you want to learn next?





I've built a Python web app, now how do I deploy it?
 




My app runs but looks awful. How do I style the user interface?
 




What other Python web frameworks exist?
 





Sponsored By


AssemblyAI logo
The most accurate speech-to-text API. Built for Python developers.





Table of Contents



1. Introduction 2. Development Environments 3. Data 4. Web Development Web Frameworks Django Flask Bottle Pyramid TurboGears Falcon Morepath Sanic Other Web Frameworks Template Engines Jinja2 Mako Django Templates Web Design HTML Cascading Style Sheets (CSS) Responsive Design Minification CSS Frameworks Bootstrap Foundation JavaScript React Vue.js Angular Task Queues Celery Redis Queue (RQ) Dramatiq Static Site Generators Pelican Lektor MkDocs Testing Unit Testing Integration Testing Debugging Code Metrics Networking HTTPS WebSockets WebRTC Web APIs Microservices Webhooks Bots API Creation API Frameworks Django REST Framework API Integration Twilio Stripe Slack Okta Security SQL Injection CSRF 5. Deployment 6. DevOps Changelog What Full Stack Means About the Author Future Directions Page Statuses ...or view the full table of contents.



Full Stack Python


Full Stack Python is an open book that explains concepts in plain language and provides helpful resources for those topics.

Updates via Twitter & Facebook.



Chapters



1. Introduction 2. Development Environments 3. Data 4. Web Development » Bottle 5. Deployment 6. DevOps Changelog What Full Stack Means About the Author Future Directions Page Statuses ...or view the full table of contents.

 



Matt Makai 2012-2021