Do you want to build your first web application with Python? Or have you been working with a full-featured web framework such as Django or Pyramid and want to try out a microframework? Take four minutes to watch this video and check off “get started using the Bottle web framework” from your 2016 to-do list:
You can snag the code in the video via this GitHub Gist or just copy from here into a file named
from bottle import route, run, Response
app = bottle.default_app()
"""Returns standard text response to show app is working."""
return Response("My Bottle app is up and running!")
if __name__ == '__main__':
run(host="127.0.0.1", port=5000, debug=False, reloader=True)
Make sure to
pip install bottle from PyPI and then run the following command:
That’s it, 15 lines of code to respond to incoming HTTP requests with a simple response!
With your quick introduction to Bottle out of the way, here’s where to go next to keep learning:
- Make and receive phone calls with Python and Bottle
- Send and respond to SMS & MMS messages
- Go through one of the many Bottle tutorials listed on Full Stack Python
Questions? Contact me via