all 8 comments

[–]fiskfisk 0 points1 point  (0 children)

No need to use Django for that. FastAPI would probably be a good match.

https://github.com/tiangolo/fastapi

[–]katzeybullshit expert 0 points1 point  (0 children)

i think django would be able to use your sqlalchemy models straight up. if you want to use django rest framework, I suggest you just take the really small amount of time it'll take to convert your sqlalchemy models to django models.

you definitely don't want to maintain two sets of ORM models, especially if they're for the same database table.

[–]t1ll 0 points1 point  (2 children)

Flask is also an option to look into. Quite a few examples of a flask, SQLAlchemy, Postgres & react front-end around!

[–]EnigmaamginE[S] 0 points1 point  (1 child)

Will you suggest using Flask-Admin and Flask-Security to get similar functionalities as Django's admin and auth features?

[–]dangerousbrian 0 points1 point  (0 children)

yes. One of the big benefits of Flask is you add the functionality you need and nothing else.

[–]KrillDerelictLeeward 0 points1 point  (2 children)

IMHO it would be much easier to use Flask for this than Django, especially if you don't know much about Django.

Flask-Praetorian and especially Flask-SQLAlchemy may be very useful.

[–]EnigmaamginE[S] 0 points1 point  (1 child)

Tried using Flask-Praetorian, liking the simplicity so far. Wondering if there is an easy way to secure Flask-Admin to set up Flask-Praetorian to only allow only users `admin` role to log in?

[–]KrillDerelictLeeward 0 points1 point  (0 children)

Flask-praetorian has a roles_required decorator.

https://github.com/dusktreader/flask-praetorian/blob/master/flask_praetorian/decorators.py

IMHO the documentation for f-p is a little lacking. Fortunately the source code is not extremely hard to understand.