Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
136 views

Bottle Python Framework

Bottle is a lightweight Python web framework known for its minimalist design and ease of use. It is considered a micro-framework as it has a small codebase and limited features compared to larger frameworks like Django or Flask. However, its simplicity and compactness make it ideal for small to medium projects. Bottle features include routing, templating, utilities and a built-in development server. While it is easy to learn and deploy, larger or more complex projects may require a more full-featured framework.

Uploaded by

Awoo NaNA
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views

Bottle Python Framework

Bottle is a lightweight Python web framework known for its minimalist design and ease of use. It is considered a micro-framework as it has a small codebase and limited features compared to larger frameworks like Django or Flask. However, its simplicity and compactness make it ideal for small to medium projects. Bottle features include routing, templating, utilities and a built-in development server. While it is easy to learn and deploy, larger or more complex projects may require a more full-featured framework.

Uploaded by

Awoo NaNA
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

BOTTLE PYTHON

FRAMEWORK
AHMAD ADIB RIDHWAN BIN ALHISHAM
AHMAD AQIL BIN AZMI
TABLE OF CONTENTS

01 03
Introduction Accessibility

02 04
Features Conclusion
Bottle is a lightweight and simple Python web
INTRODUCTION framework designed for building web applications.
It is known for its minimalist design and ease of
use. Bottle is often considered a micro-framework,
as it has a small codebase and a limited set of
features compared to larger frameworks like
Django or Flask. However, its simplicity and
compactness make it ideal for small to medium-
sized projects where a full-fledged framework
might be overkill.

Bottle's simplicity and ease of learning make it a


popular choice for developers who prefer a
minimalist approach or have smaller-scale projects.
However, if you anticipate the need for more
advanced features or scalability, you might consider
other frameworks like Flask or Django, which offer
a broader range of capabilities.
MAIN
FEATURES
Routing
Bottle.py requests dispatching,
so provide clean and dynamic
URL-routes for mapping. Use
simplified syntax or regular
expressions for URL parameters
WSGI
Bottle.py is Web Server
Gateway Interface framework
and work with CGI and
WSGI internals is easy.
Templates
Integrated template engine is
fast and built for Python user's.
There is support for mako, jinja2
and cheetah templates.
Utilities
Bottle.py provides convenient
access to form data, headers, Speed
file uploads, cookies and other
HTTP related metadata Optimizations
fast static routes and frequently
used routes are tested first.
Platform-specific high-
performance file-transmission
facilitiesare supported as well.
Depends on wsgi.file_wrapper
provided by WSGI-Server
Server implementation
Built-in HTTP development server and
support for paste, fapws3, flup, bjoern,
wsgiref.simple_server (default),
cherrypy, Google App Engine or any
other WSGI capable HTTPs
LOGO
ADVANTAGES

Small Size Easy to Deploy Easy to Learn

Situated in single file, Install through global Python User’s Guide available for
50-60kb, not overpacked index, can run with no config basic Python and web
and has essential modules in Python 2.5+ & Python 3 development knowledge

Ideal for small Faster than


powerful frameworks
Still developing
web applications

Create and manage web parses and renders A number of plugins


page and websites templates 5 to 10 times were added
using Python functions faster than mako
BOTTLE VS DASH
BOTTLE
BOTTLE DASHDASH

• Python microframework for • Data Apps & Dashboards for


building web applications Python

• Used for web page and website


management • Used for data analysis and
visualization
• Web frameworks and Internet
applictions • Plotly as graph plotting
application
Installation
1. Open Ubuntu 64x
2. Open Terminal
3. Install bottle using ‘$ pip3
install bottle’

THAT’S ALL!!
How To Create Application

1 2 3
Create Bottle_App folder Open Terminal app, type Add coding to text
in home folder $ nano ~/Bottle_App/hello.py application as following
How To Create Application

import bottle
Coding: from bottle import route, run, Response

@route(‘/’)
def index():
return Response(“<h1>Hello World</h1> <b1>Adib
& Aqil are Python Programmers,.. We can use Bottle
Python Framework now!”)

if __name__ == ‘__main__’
run(host=’0.0.0.0’, port=8000, debug=True,
reloader=True)
How To Create Application

4 5 6
Save, close the project write $cd Bottle_App, then Open browser and type in
and open Terminal App write $python hello.py http://0.0.0.0:8080
The Result
DISCUSSION
Here are some points about advantages and disadvantages of using Bottle Python
Framework
CONCLUSION
In summary, Bottle is a lightweight, efficient,
and easy-to-use Python framework for
building web applications. Its simplicity,
versatility, and performance make it an
attractive choice for developers looking to
create small to medium-sized web projects.
Whether you are a beginner or an
experienced developer, Bottle offers a solid
foundation for building robust and scalable
web applications.
REFERENCES
• https://www.bogotobogo.com/python/Bottle/Python_Bottle_Framework.php

• https://bottlepy.org/docs/dev/

• https://www.geeksforgeeks.org/introduction-to-bottle-web-framework-python/

• https://realpython.com/developing-with-bottle-part-1/
THANKS!
ありがとう
CREDITS: This presentation template was created by

ございます
Slidesgo, incluiding icons by Flaticon, and
infographics & images by Freepik.

You might also like