Compare Django and Bottle

Django is Python web framework that encourages rapid development. It is based model-template-view (MTV) design pattern. It follows a "batteries included" philosophy and ships with many tools that are needed by application developers such as ORM framework, admin panel, directory structure and more.

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.

Let's see how Django and Bottle compare on various factors and features and which to choose when.

Django

Bottle

Overall

Type

Type
Python all-inclusive, megaframework for building web application.
Type
Python microframework for building web applications.

Author

Author
Adrian Holovaty - Author of Django
Adrian Holovaty and Simon Willison.

Release Date

Release Date
2005
Release Date
2009

License

License

Website

Website
Adoption and Ease of Use

Popularity [?]

Popularity [?]
5 Stars
Used by 367,000 projects.
Popularity [?]
1.5 Stars
Used by 14,000 projects.

Used by

Used by
Instagram, Pinterest, Coursera, Udemy.
Used by
No data.

Jobs [?]

Jobs [?]
5 Stars
2074 job openings which list Django as a requirement.
Jobs [?]
1 Star
74 job openings which list Bottle as a requirement.

Performance [?]

Performance [?]
4.5 Stars
Not as fast as compared to bare-bones Flask or other microframeworks, but for many real-world use cases, the difference is negligible.
Performance [?]
5 Stars
Very fast. Extensions could impact performance adversely.

Flexibility

Flexibility
4.5 Stars
Django expects things to be done in a certain way unlike microframeworks (e.g. Flask) which have no opinion on how developers structure things. However, It does this without compromising on flexibility. Django has been used to build a variety of things from content management systems to social networks to scientific computing platforms.
Flexibility
5 Stars
Very flexible and extremely simple. Doesn't force anything on developers.

Ease of Learning

Ease of Learning
5 Stars
Has a learning curve especially for those who are not familiar with other web frameworks. But there are some great online resources, courses tutorials and YouTube videos.
Ease of Learning
5 Stars
Straightforward and easy to learn. It has a good amount of tutorials online.
Database Support

RDBMS Support

RDBMS Support
Built-in Support
Built-in
Django ships with a built-in ORM framework for developers to start using out of the box.
Verdict ORM is one of the best features of Django, loved by developers.
RDBMS Support
Through Plugins or Extensions
Through Plugins or Extensions
No built-in ORM framework. Leaves it up to developers to choose a library like SQLAlchemy or extensions such as Macaron.

NoSQL Support

NoSQL Support
NoSQL databases are not officially supported by Django. There are open source projects like PynamoDB or Django MongoDB Engine, Django non-rel to support NoSQL. Some of these extensions support specific Django versions and don't interplay well with Django ORM.
Verdict Using NoSQL database with Django is not recommended.
NoSQL Support
No built-in support but 3rd party Python libraries like PyMongo or Bottle-Mongo can be used to talk to NoSQL databases.
Web & Core Features

Admin Dashboard

Admin Dashboard
Built-in Support
Built-in
Django ships with a web-based admin site that has a friendly UI. It allows you to quickly perform CRUD operations against your models from your browser to test things out.
Admin Dashboard
Through Plugins or Extensions
Through Plugins or Extensions
No built-in admin panel.

REST Support

REST Support
While not built-in, REST development is supported via the popular and active Django REST Framework project. It provides support for API versioning, Browsable API for interacting with APIs through web browser, authentication (OAuth1 and OAuth2) and serialization support for both ORM and non-ORM sources.
REST Support
No built-in support but can be implemented easily.

Security

Security
Built-in protection against several common attack vectors like CSRF, XSS, and SQL injection. When vulnerabilities are discovered, the Django team has an excellent security policy and fixes are released quickly.
Security
No built-in protection. Bottle is a minimalist framework. Must be handled by developers themselves or by using 3rd party extensions.

Templating Library

Templating Library
Uses its own templating engine. You could configure Django to use Jinja2 if you like.
Templating Library
Fast and pythonic built-in template engine and support for mako, jinja2 and cheetah templating languages.

Web Forms

Web Forms
Ships with built-in ModelForms which provides complete support for web forms including input validation, CSRF, XSS, and SQL injection.
Web Forms
No built-in support.

Authentication

Authentication
Built-in authentication, authorization, account management and support for sessions.
Authentication
Using a plugin such as Bottle-Cork

Testing

Testing
Built-in support using Python's unittest framework.
Testing
Using WebTest and Nose.

If you found this useful, please help us grow by sharing this article with your followers using the sharing icons. Every share or call out will help. Thank you.

Similar Comparisons

Speak Your Mind