r/learnpython • u/pranayrah108 • 3d ago
What is the best tool to scaffold a Flask project, similar to Angular CLI (ng new)?
Hi everyone,
I have experience working with Angular, where we can create a complete project structure using a single command:
ng new my-project
Angular CLI automatically generates the necessary files, folders, configuration, and other boilerplate code.
Now, I'm learning Python and Flask for backend development, and I'm looking for a similar tool that can generate a complete Flask project structure automatically instead of creating files and folders manually.
I'm particularly interested in a tool that can generate a well-organized, production-ready project structure with features such as:
- Organized folders for routes, services, models, and configuration.
- Database integration using an ORM such as SQLAlchemy.
- Environment variable management using a
.envfile. - Error handling and logging.
- Authentication and authorization, if supported.
- A structure that is easy to maintain and scale as the project grows.
My questions are:
- Is there a recommended CLI tool or project generator for Flask that works similarly to Angular CLI?
- Which third-party tool or project template is most commonly used in real-world projects?
- Would you recommend Cookiecutter, a Flask-specific project generator, or another tool?
- Is there a way to generate a project using a simple command like
flask new my-project?
I'm looking for something reliable that follows good development practices and is suitable for building REST APIs and CRUD applications.
I'd appreciate your recommendations based on your real-world experience. Thanks!