r/learnpython • • Oct 22 '26

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 .env file.
  • 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:

  1. Is there a recommended CLI tool or project generator for Flask that works similarly to Angular CLI?
  2. Which third-party tool or project template is most commonly used in real-world projects?
  3. Would you recommend Cookiecutter, a Flask-specific project generator, or another tool?
  4. 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!

0 Upvotes

3 comments sorted by

3

u/danielroseman Oct 22 '26

Cookiecutter is the general library for scaffolding, and https://github.com/cookiecutter-flask/cookiecutter-flask looks like a good template for that in Flask.

However I would say that Flask is best for simpler applications. If you're looking to build something as complex as this it might be better to start with Django instead.

→ More replies (1)

2

u/CartographerDue5382 Oct 22 '26

Short answer to the last one: no, there's no official `flask new`. Flask is deliberately unopinionated, so the closest thing is a template like the cookiecutter one above, or just following the structure from the official tutorial.

The pattern people usually mean by "production-ready" is an application factory (create_app()) with blueprints per feature area, and that's covered in the Flask docs under Application Factories and Blueprints. The usual pieces for your list: Flask-SQLAlchemy + Flask-Migrate for the ORM and migrations, python-dotenv (Flask loads .env and .flaskenv automatically once it's installed), Flask-Login for session auth or Flask-JWT-Extended if it's a pure API, and the stdlib logging module for logs.

If you want Angular-CLI-style batteries included, Django does that with `django-admin startproject` and ships auth/ORM/admin built in. For REST APIs there's also FastAPI, which has an official full-stack template. Worth a look before you commit to Flask.