https://github.com/adaiasmagdiel/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.
https://github.com/adaiasmagdiel/create-flask-app
Last synced: 3 months ago
JSON representation
This project creates a folder system for a Flask application, which is useful when you want to gain productivity without losing quality.
- Host: GitHub
- URL: https://github.com/adaiasmagdiel/create-flask-app
- Owner: AdaiasMagdiel
- Created: 2023-11-24T00:21:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-07T22:02:47.000Z (about 1 year ago)
- Last Synced: 2025-01-06T02:28:32.329Z (5 months ago)
- Language: Python
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```cmd
@echo offpy path\to\this\project\main.py %*
```
Then, you can save this file in a folder thats is already in path and run:
```cmd
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.