Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternatives to Django for Python based Web Development? [closed]

I am about to start a new personal web / iphone app project which requries the following:

  • Storing data on the backend
  • authenticating the user via openid
  • Generate JSON based APIs for reading and writing data

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:

  • lightweight
  • easy to install, deploy and developwith

Any recommendations?

like image 911
mikechambers Avatar asked Jul 12 '12 16:07

mikechambers


People also ask

Can we use Python without Django?

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.

Is Django still used for web development?

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.

Is FastAPI better than Django?

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.

Is Django still in demand?

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.


2 Answers

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

"Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions." - http://flask.pocoo.org/

Pylons

"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

"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

"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/

More Python Framework Resources

After a little more digging I found this resource: http://wiki.python.org/moin/WebFrameworks/

like image 51
potench Avatar answered Oct 06 '22 01:10

potench


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>
like image 20
Robbie Rosati Avatar answered Oct 06 '22 01:10

Robbie Rosati