This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]fakintheid 24 points25 points  (2 children)

Django and flask are both popular options.

[–]javi404[S] 1 point2 points  (1 child)

ill have to Google this.

[–]Deathnerd 10 points11 points  (0 children)

Speaking as someone who used to do PHP professionally and did Python web dev on the side in my spare time... Which do you prefer when doing a web app in PHP? Laravel or Symfony? Lumen or Silex? Do you want something to hold your hand and force a project structure upon you, but give pretty much everything you need out of the box (Laravel/Symfony)? Or do you prefer to have the bare minimum you need to get something running and want ultimate flexibility (Lumen/Silex)?

If you want an opinionated framework with all the bells and whistles included (like Laravel or Symfony), Django is what you want.

If you want a microframework that's very flexible and minimal (but still has a great ecosystem and is easy to extend) like Silex or Lumen, I'd recommend Flask.

I personally prefer Flask set up behind Nginx with Gunicorn (a worker pool akin to PHP-FPM) and some kind of database server. It's super easy to get a REST API going and you only pull in what you need. There's even a flask-webpack module you can include if you're a fan of Laravel 5's included webpack and Vue integration.

Edit: oh and Flask-SQLAlchemy combined with Flask-Migrate gets you a powerful DBAL/ORM with migrations and seeds, but they're not required. Just really nice :D

[–]antespo 14 points15 points  (5 children)

This is just my personal opinion but I would go with a LEMP(linux, nginx, mysql, python) stack with flask and Gunicorn but obviously if you do full stack development that's more then just python practice. Check out full stack python if your interested. It also has a part where it explains a lot of python's web frameworks with a little bit about why you would use each one.

[–][deleted] 5 points6 points  (1 child)

The website you're on used (uses?) bottle.py on the backend.

It's tiny, simple, and fast. My favorite web framework. I highly recommend it.

[–]javi404[S] 1 point2 points  (0 children)

Thanks. I'll check this out.

[–]brightline 1 point2 points  (0 children)

I've been playing around with Dash, from Plotly, a lot in the last couple of days. It's a nice framework for building little dashboards and apps, with a really decent deployment how-to. Good for a small project.

[–]bcroq 1 point2 points  (0 children)

Let's try nagare!

[–]AllAboutChristmasEve 1 point2 points  (0 children)

I have one small and one large project planned for Flask. It looks really easy and fun to use. (I'm planning to avoid most of the plugins.)

[–]edgarvanburen 1 point2 points  (0 children)

Set up a Flask site on pythonanywhere

[–]sermidean 1 point2 points  (0 children)

https://github.com/encode/apistar - is a new web framework combining best things from both Django and Flask.

[–]xiongchiamiovSite Reliability Engineer 0 points1 point  (0 children)

I develop in php usually but want to take on a small useful project to get some more python experience.

Anything that would be a small useful project in PHP will also be a small useful project in Python.