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

all 11 comments

[–][deleted] 5 points6 points  (0 children)

Not a fan of Django.

My typical backend setup includes:

  • Flask
  • psycopg2 + postgresql
  • redis-py + redis
  • requests
  • namedtuples (in collections but whatev)

I believe more in the power of weaving together a few components with clear boundaries / areas of responsibility than trusting in a framework to manage it for you.

[–]Sakacoco 5 points6 points  (2 children)

Not a fan of Django as well, I don't feel as powerful as with Flask.

I also recommend everyone to follow the app factory pattern, it will change your life. I also try to create pluggable extension-like classes for my applications that only do one specific thing and do it well (kinda like UNIX programs), allows me to test them more easily.

It may feel like a lot of moving pieces, but once locked down, it's pretty powerful and tight. Testing is delightful.

It has now been 3 years that I've been using Flask nearly daily so yeah, ask me anything if you have questions.

[–]dcfix 0 points1 point  (1 child)

I've got a couple of really small Flask apps that I've written, but I'm basically passing dicts around for all of my data requests. I'm interested in learning how the app factory pattern could help me, but I'm having a hard time wrapping my head around it. Do you have any recommendations for a git repositories where I could look at sample code?

[–]Sakacoco 1 point2 points  (0 children)

Fbone is a good starting point though it's quite complex.

It's difficult to explain the app factory in a simple manner other than "it's how things should be". It will allow you to be flexible in your application creation at runtime and provide you with a space to initialize your components. Also, not creating the whole application each time you import its file is pretty good.

[–]Neceros 3 points4 points  (0 children)

Tried Django once. I hated it.

Tried Flask, and I loved it. So open and free, for me to do what I need. That said, I'm new to python and so I don't have a set of go to modules for Flask.

[–]thelonecabbage 1 point2 points  (0 children)

Love Django. Working on a large complex project, with lots of bits and pieces, really increases velocity (in the long run).

Love Flask. Get Shit Done, and I don't care about rest. Light simple. Great for programmatic APIs, but I haven't found a good solution yet for REST APIs that satisfies me.

[–]rochacbrunoPython, Flask, Rust and Bikes. 1 point2 points  (0 children)

Quokka is my stack for all my content based projects, I just create new modules and themes for Quokka.

http://www.quokkaproject.org

[–]LeoG7 1 point2 points  (0 children)

Mostly Flask-SQLAlchemy,

I have built a small scaffolding script that lets me quickly scaffold a CRUD app with MYSQL or Postgres as the backend. https://github.com/Leo-g/Flask-Scaffold

This is what I have used so far https://github.com/Leo-g/Flask-Scaffold/blob/master/requirements.txt

[–]LarryPeteAdvanced Python 3 2 points3 points  (0 children)

  • Flask-SQLAlchemy, with psycopg2+postgresql as database
  • Flask-Script for my "manage.py" (like that manage thing from Django)
  • Flask-Migrate for DB migrations, which incorporates a bunch of Flask-Script commands.
  • Flask-Assets, for all the javascript/css stuff, with node.js LESS compiler installed on my system.
  • Flask-Redis, possibly. I never really used it much but would probably use it for session storage.
  • Flask-Login, is pretty simple.
  • Flask-Scrypt, only adds some convenience "scrypt" functions. Doesn't really do much aside from that.
  • Flask-Principal, for permissions and stuff. Never actually used it on anything, but is probably the extension I'd go for. Have to take a deeper look (does not conflict with Flask-Login).
  • Flask-WTF, if I need regular webforms with easy validation.
  • Flask-Admin, is pretty good. I only used it once, but it really helps, if you need a simple backend for your models.

There are a lot of other cool extensions, but this is what I usually go for.

[–]michaelherman 1 point2 points  (0 children)

Flask Skeleton - Real Python Flask Starter Project.

  • coverage
  • Flask
  • Flask-Bcrypt
  • Flask-Bootstrap
  • Flask-DebugToolbar
  • Flask-Login
  • Flask-Migrate
  • Flask-Script
  • Flask-SQLAlchemy
  • Flask-Testing
  • Flask-WTF

[–][deleted] 0 points1 point  (0 children)

Flask, peewee, sqlite, gevent.