3 ms·
I recently went down this path, trying to build something akin to DRF but using Flask. I'd never used Flask before, but had some Django experience and was no st
by peller 9y ago
I recently went down this path, trying to build something akin to DRF but using Flask. I'd never used Flask before, but had some Django experience and was no stranger to Python or web frameworks in general. With Flask there are a lot of choices you need to research/make around which libraries to use, and how to get them all playing nice together. I obviously ended up using SQLAlchemy but decided to spend some time writing a customized integration between Flask-RESTful and Flask-Marshmallow for the views/serialization layer.
Certainly it took me a bit longer to get up and running compared to if I'd just used DRF, but on the plus side, I feel like I have much stronger grasp on how everything works now, whereas Django still has a ton of surface area that feels a bit like magic to me. If you're interested, the repo is open sourced under MIT here[0].
[0] https://github.com/briancappello/flask-react-spa https://github.com/briancappello/flask-react-spa
- c0un7d0wn 9y agoI went the other way around and came up with https://github.com/shosca/django-rest-witchcraft https://github.com/shosca/django-rest-witchcraft as the project is already using django+sqlalchemy and I needed to do api's on existing things.
- peller 9y agoNice! How do you find SQLAlchemy integrates with Django overall? (Can you use its models with the admin?)