I am about to start a new personal web / iphone app project which requries the following:
I normally use Django for all of my projects but thought I would take this opportunity to learn something new. So, are their any Python based web development frameworks that are good alternatives to Django? Ideally ones that are strong on the points listed above?
Bonus points if the framework is:
Any recommendations?
With Flask, you have no unnecessary module that have Django (admin, auth...) by default, so you can focus on your database management. If you want an answer that respect your question, yes you can make a website in Python without framework.
Django is now a thriving, collaborative open source project, with many thousands of users and contributors. While it does still have some features that reflect its origin, Django has evolved into a versatile framework that is capable of developing any type of website.
In conclusion, Django is perfect if you want to build robust full-stack web applications because it has several functionalities and works very well in production. On the other hand FastAPI is perfect if you're looking for high performance or scalable applications.
Naturally, the demand for Django Developers and Python Developers (with Django skills) remains at an all-time high. Companies look for candidates who've had hands-on Django training and possess a good grip on Python. They usually incline towards candidates who are well-versed in Django, AngularJS, and Spark/Big Data.
I've only ever used Django and I love it, but here's a couple others (I think Flask is your best bet for a very small and very lightweight web app)
"Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions." - http://flask.pocoo.org/
"Rather than focusing on a single web framework, the Pylons Project will develop a collection of related technologies. The first package from the Pylons Project was the Pyramid web framework. Other packages have been added to the collection over time, including higher-level components and applications. We hope to evolve the project into an ecosystem of well-tested, well-documented components which interoperate easily." - http://www.pylonsproject.org/
"Grok is a web application framework for Python developers. It is aimed at both beginners and very experienced web developers. Grok has an emphasis on agile development. Grok is easy and powerful." - http://grok.zope.org/
"TurboGears will help you to create a database-driven, ready-to-extend application in minutes. All with code that is as natural as writing a function, designer friendly templates, easy AJAX on the browser side and on the server side and with an incredibly powerful and flexible Object Relational Mapper (ORM)." - http://www.turbogears.org/
After a little more digging I found this resource: http://wiki.python.org/moin/WebFrameworks/
I've used web2py for a couple small projects and really liked it.
It is pretty lightweight, has great documentation, and in my experience very simple to deploy. I've never used Django, so I'm not sure how it compares.
A few hello worlds:
def hello1():
return "Hello World"
def hello5():
return HTML(BODY(H1(T('Hello World'),_style="color: red;"))).xml() # .xml to serialize
def hello3():
return dict(message=T("Hello World"))
The corresponding view for hello3
:
{{extend 'layout.html'}}
<h1>{{=message}}</h1>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With