Skip to content

This project creates a folder system for a Flask application, which is useful when you want to gain productivity without losing quality.

Notifications You must be signed in to change notification settings

AdaiasMagdiel/create-flask-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Flask App

This project creates a folder system for a Flask application, which is useful when you want to gain productivity without losing quality.

Folder Structure

├── app/
│   ├── __init__.py
│   ├── settings.py
│   ├── routes/
│   │   ├── api/
│   │   │   ├── __init__.py
│   │   │   └── routes.py
│   │   └── __init__.py
│   └── cache/
│       └── __init__.py
├── .env.example
├── .gitignore
├── main.py
└── requirements.txt

Structure Description

  • app/ Directory

    • **init.py:** This file indicates that the 'app' directory should be treated as a Python package.
    • settings.py: Configuration settings for the application.
    • routes/: A subdirectory containing modules related to routing.
      • api/:
        • **init.py:** Marks the 'api' directory as a Python package.
        • routes.py: Defines API-specific routes.
      • site/:
        • **init.py:** Marks the 'site' directory as a Python package.
        • routes.py: Contains routes for the main site.
      • **init.py:** Marks the 'routes' directory as a Python package.
      • error_handler.py: Handles errors for the routes.
  • .env: Configuration file used to store environment variables for the application.

  • .gitignore: Specifies files and directories that should be ignored by version control.

  • main.py: The main entry point for the application.

  • requirements.txt: Lists the dependencies and their versions required for the project.

Installation

  1. Clone the repository to your local machine:

    git clone https://github.com/AdaiasMagdiel/create-flask-app.git
    

Usage

You can make a .bat or a .sh to run the project via cli. See a windows create-flask-app.bat example:

@echo off

py path\to\this\project\main.py %*

Then, you can save this file in a folder thats is already in path and run:

create-flask-app test-app

This will create a test-app folder with the project.

Feel free to modify and extend the application based on your requirements.

About

This project creates a folder system for a Flask application, which is useful when you want to gain productivity without losing quality.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages