Cookie Cutter Flask - Generate Websites with ease
Tags: webdev, flask, generators, appseed
Published: 2021-11-24 15:31:54

---
title: Cookie Cutter Flask - Generate Websites with ease
published: true
description: A simple way to generate simple Flask websites. Cookie Cutter Flask is an open-source tool published on Github.
tags: webdev, flask, generators, appseed
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r7qa8s46kc4iqvrwc7mz.jpg
canonical_url: https://blog.appseed.us/cookie-cutter-flask-generate-website-templates/
---
Hello Coders!

This article presents an open-source tool that we can use to generate simple, yet modern presentation websites on top of Flask Framework. [Cookie Cutter Flask](https://blog.appseed.us/cookie-cutter-flask-generate-website-templates/) extends the popular `CookieCutter` command-line tool to build simple `Flask` projects enhanced with database, authentication, and Docker support using a theme-able approach where the user can select the design during the generation process.  In the end, without any coding effort, the generator will provide a seed project similar to these LIVE samples:

- 👉 [Flask Pixel Lite](https://flask-pixel-lite.appseed-srv1.com/) - LIVE demo ([source code](https://github.com/app-generator/flask-pixel-lite) 🔗)
- 👉 [Flask Material Kit](https://flask-material-kit.appseed-srv1.com/) - LIVE demo ([source code](https://github.com/app-generator/flask-material-kit) 🔗)  

---

![Cookie Cutter Flask - Material Kit Design, generated sample project.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pcz4zhpp1av7p4l1p2wi.gif)

---

## ✨ How It works

`CookieCutter` tool is a popular open-source generator written in Python that knows how to build software projects using templates and user input. Basically, a codebase or a template project can be customized during the generation process based on the user input. Types of customizations:

- Project name, author, and license type
- Decide the database type we will use in our project
- Inject deployment scripts for Docker
- Add or remove basic features (authentication, for instance)

In order to use our simple Flask generator, a short-list with tools should be already present in the workstation:

- `Python3` - the language that powers **CookieCutter**
- `GIT` - versioning command-line tool
- A modern editor like `VsCode` or `Atom`

With all the tools properly installed and accessible in the terminal window, we can proceed further with our setup.

---

> 👉 **Step #1** - Install Python modules: CookieCutter and GitPython

```bash
$ pip install cookiecutter
$ pip install GitPython
```

---

> 👉 **Step #2** - Generate the project via [Flask Cookie Cutter](https://github.com/app-generator/cookiecutter-flask-sites)

```bash
$ cookiecutter https://github.com/app-generator/cookiecutter-flask-sites.git
```

The most important step is when we select the design:

```bash
>>> Select theme:
1 - material-kit
2 - pixel-lite
Choose from 1, 2 [1]: 1      <--- HERE We select the UI
```

As mentioned before, the generator is theme-able and we can choose the design: [Pixel Lite](https://flask-pixel-lite.appseed-srv1.com/) or [Material Kit](https://flask-material-kit.appseed-srv1.com/).  

---

> Pixel Lite - The Freelancer page

![Pixel Lite - The Freelancer page.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/82z7hcza2n6nyxt08ker.png)

---

> Material Kit Website - User Page  

![Material Kit Website - User Page.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gqh57ya6kk5jjda5s4bh.png)

---

Once the `Cookie Cutter` collects the input from the user, the selected theme is downloaded from Github and the project is generated by taking into account all user options.

After the process is completed, we can compile and start the project using Docker or simply via a manual classic build for a Flask/Python project.

For the complete build instructions, please access the source code published on Github or ask for support via email or [Discord](https://discord.gg/fZC6hup).  

--- 

> **Thanks for reading!** For more resources and support, feel free to access:

- 👉 AppSeed for [support](https://appseed.us/support) via Email and [Discord](https://discord.gg/fZC6hup)
- 👉 [Free Dashboards](https://appseed.us/admin-dashboards/open-source) - crafted in Django, Flask, and [React](https://appseed.us/apps/react).