Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flask-Admin vs Flask-AppBuilder

I am new to Flask and have noticed that there are two plugins that enable CRUD views and authorized login, Flask-Admin and Flask-AppBuilder.

These two features interest me along with nice Master-Detail views for my model, where I can see both the rows of the master table and the relevant details on the same screen.

Any idea which one to prefer? I see that Flask-AppBuilder has far more commits in Github, while Flask-Admin many more stars.

How to tell the difference, without spending too much time with the wrong choice?

like image 980
petroslamb Avatar asked May 08 '15 14:05

petroslamb


People also ask

What is Flask AppBuilder?

Flask AppBuilder (F.A.B) is one of them. As an (extended) web app development framework, FAB is open source, and initiated and maintained by Daniel Vaz Gaspar. It is easy to use, rapid in application development. It includes detailed security, auto CRUD generation for your models, Google charts, and much more.

What is Flask admin?

Flask-Admin is a batteries-included, simple-to-use Flask extension that lets you add admin interfaces to Flask applications. It is inspired by the django-admin package, but implemented in such a way that the developer has total control of the look, feel and functionality of the resulting application.

How do you use the Flask Fab command?

$ flask fab create-app --help Usage: flask fab create-app [OPTIONS] Create a Skeleton application Options: --name TEXT Your application name, directory will have this name --engine [SQLAlchemy|MongoEngine] Write your engine type --help Show this message and exit.


2 Answers

For me, master/detail is the major feature. That led me to use Flask AppBuilder to create ApiLogicServer:

With 1 command, create a database API, to unblock UI development. Also, a multi-page web app, to engage Business Users - early in the project. Declare logic with spreadsheet-like rules - 40X more concise than code, extensible with Python - for remarkable business agility.

like image 93
val Avatar answered Oct 02 '22 01:10

val


I am the developer of Flask-AppBuilder, so maybe a strong bias here. I will try to give you my most honest view. I do not know Flask-Admin that much, so i will probably make some mistakes.

Flask-Admin and Flask-AppBuilder:

  • Will both give you an admin interface for Flask with bootstrap.
  • Will both make their best to get out of your way.
  • Will both help you develop Flask more Object Oriented style.
  • Will both let you override almost everything on the admin templates.
  • Will both support Babel.
  • Both inspired on Django-Admin.

Pros for Flask-AppBuilder:

  • Has a nicer look and feel (bias? maybe...).
  • Security has been taken care of for you, and supports out of the box, database, LDAP, OpenID, Web server integrated (REMOTE_USER), and in the near future OAuth too. Will let you extend the user model and security views.
  • Granular permissions, creates one permission for each web exposed method and action (you have to try it).
  • You can easily render Google graphs.
  • Smaller project, it's easier to request new features, and get your pull requests merged.
  • MasterDetail views and multiple views can be setup easily.
  • Backends: supports SQLAlchemy, MongoEngine, GenericInterface (you can integrate with your own builtin data still a bit beta).

Pros for Flask-Admin:

  • You have to assemble your own security (models, views, auth etc), it's ready though to integrate nicely with flask-security. This can be a pro or a con depending on what you want.
  • Builtin File Admin.
  • Bigger project with bigger community.
  • Backends: supports SQLAlchemy, GeoAlchemy, MongoEngine, Pewee and PyMongo.
  • Better support for MongoEngine (EmbeddedDocument, ListFields etc..).

On the overall i think Flask-Admin makes no assumptions at all like Flask, you have to code more, but this will let you be more free. Flask-AppBuilder makes some assumptions (on security), you will have to code much less, but some things can get on your way if your building very specific security models.

Hope this helps you and others, i tried my best to keep the bias out.

like image 29
dpgaspar Avatar answered Oct 02 '22 00:10

dpgaspar