Introduction
When it comes to Python for web development. I feel that it is really not talked about much. Since the upward trend & p...
For further actions, you may consider blocking this person and/or reporting abuse
Out of curiosity, why recommend Django over Flask?
(disclamer: I work in Flask, never wrote anything in Django, but have some idea about how it works - also work with Rails, which I guess is a similar beast)
I would guess it's because of simplicity of making basic app. If you main goal is to provide web interface for data manipulation (dashboards, APIs), there's little need to understand how it works and write everything yourself (as you will probably do when starting in Flask until you find all the right plugins and/or write abstractions you need).
Yup it's actually a replica of Ruby for Django. Which is why data scientists will work with Flask more than Django.
Due to its huge learning curve that follows to just to understand it and use it fully because you are really going past the microservice and API aspects of it.
Are you saying flask has a huge learning curve while also advocating Django? Or am I misunderstanding? I've done professional work in both; flask was significantly easier to get people productive in fastest but I did lay solid foundations following good patterns and recommended extensions like flask-talisman and co.
Ahh.. its my bad I wrote wrongly. I was referring to Django for steep learning curve.
To me it is more like of a overkill to use Django. Which Data Scientists just prefer to get it done with a quick & dirty solution.
Depending on who you talk to they might not even know of the concept of clean code or TDD.
When they are building a data product as it is not part of their job to do it.
Django has security built-in by default.
You do more with less, without the need to code everything by yourself.
Because of their batteries included philosophy like Object Relationship Mapping (ORM), customisable Admin Panel, Account Management with a very wide 3rd party ecosystem.
Which if you want to do it yourself, you need to explore multiple types of python packages.
Don't get me started in projects structures for Flask. Which the last good option was to use cookiescutter to help you set it up because there is literally 2 or 3 way to build Flask that differs greatly.
Which you need to have a consensus to structure your project.
In a way so that it is easy to maintain but it requires your understanding of concepts to abstract parts of your code and manage the project structure correctly.
I love Python for web apps! I also recommend to use Django for most of the cases.
By the way, check out this awesome Django project template: it allows to start new Django projects filled with best-practices and good tools in just a few clicks.
Features:
python3.7+poetryfor managing dependenciesmypyand django-stubs for static typingpytestandhypothesisfor unit testsflake8and wemake-python-styleguide for lintingdockerfor development, testing, and productionsphinxfor documentationGitlab CIwith fullbuild,test, anddeploypipeline configured by defaultCaddywithhttpsandhttp/2turned on by defaultBleeding edge django template focused on code quality and security.
wemake-django-template
Bleeding edge
django2.2template focused on code quality and security.Purpose
This project is used to scaffold a
djangoproject structure Just likedjango-admin.py startprojectbut better.Features
python3.7+build,test, anddeploypipeline configured by defaulthttp/2turned on by defaultInstallation
Firstly, you will need to install dependencies:
Then, create a project itself:
Who are using this template?
If you use our template, please add yourself or your company in the list.
We offer free email support for anyone who is using this If you have any problems or questions,…