Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Artbyo3/flite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Flite - Flask Project Generator

πŸš€ Flite is a CLI tool that generates Flask projects automatically. Creates projects with modern structure, automatic configuration, and production-ready setup.

✨ Features

  • πŸ—οΈ Generates Flask projects with professional structure
  • βš™οΈ Automatic virtual environment configuration
  • πŸ“¦ Pre-configured dependencies
  • 🎨 Modern HTML/CSS/JS templates
  • πŸ”§ Automatic environment variables
  • πŸ“ Standard folder structure
  • πŸš€ Commands for development and production
  • πŸ—„οΈ Support for SQLite database or no database

πŸš€ Installation

Install from source

# Clone the repository
git clone https://github.com/artbyo3/flite.git
cd flite

# Install in development mode
pip install -e .

Install with pip (when available on PyPI) !!!!! NOT Available!!!!

pip install flite------------------

πŸ“– Usage

Interactive mode (recommended)

flite interactive
# or simply
flite create

Command line mode

# Basic project
flite create my-project --template basic --database sqlite

# REST API project  
flite create my-project --template api --database none

# Run project
cd my-project
flite run

# Build for production
flite build

πŸ—οΈ Generated structure

Basic template

my-project/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ __init__.py          # Application factory
β”‚   β”œβ”€β”€ routes.py            # Main routes (index only)
β”‚   β”œβ”€β”€ static/
β”‚   β”‚   β”œβ”€β”€ css/style.css    # Minimal custom styles
β”‚   β”‚   └── js/main.js       # Minimal custom JavaScript
β”‚   └── templates/
β”‚       β”œβ”€β”€ base.html        # Base template
β”‚       └── index.html       # Simple page with "Flite"
β”œβ”€β”€ .venv/                   # Virtual environment (hidden)
β”œβ”€β”€ .env                     # Environment variables
β”œβ”€β”€ .gitignore              # Git ignore file
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ config.py               # Application configuration
└── run.py                  # Execution script

API template

my-project/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ __init__.py          # Application factory
β”‚   β”œβ”€β”€ routes.py            # API endpoints
β”‚   └── templates/
β”‚       └── index.html       # API documentation page
β”œβ”€β”€ .venv/                   # Virtual environment (hidden)
β”œβ”€β”€ .env                     # Environment variables
β”œβ”€β”€ .gitignore              # Git ignore file
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ config.py               # Application configuration
└── run.py                  # Execution script

πŸ› οΈ Technologies included

Backend

  • Flask - Web framework
  • SQLAlchemy - Database ORM (when database enabled)
  • Flask-Migrate - Database migrations (when database enabled)

Frontend

  • HTML5 - Semantic structure
  • CSS3 - Modern styles
  • JavaScript - Basic interactivity

Database

  • SQLite - Local database (optional)
  • No Database - Static files only

πŸš€ Examples

Basic web application

flite create my-blog --template basic --database sqlite
cd my-blog
flite run
# Visit http://127.0.0.1:5000

REST API

flite create my-api --template api --database none
cd my-api
flite run
# Visit http://127.0.0.1:5000 for API documentation

πŸ”§ Configuration

Environment variables

The .env file is generated automatically with basic configuration:

# Flask configuration
FLASK_APP=run.py
FLASK_ENV=development
SECRET_KEY=your-secret-key-here

# Database configuration (if enabled)
DATABASE_URL=sqlite:///app.db

Customization

You can customize your project by editing:

  • config.py - Application configuration
  • app/static/css/style.css - Custom styles
  • app/static/js/main.js - Custom JavaScript
  • app/templates/ - HTML templates

πŸš€ Deployment

Development

flite run --debug

Production

# Build for production
flite build

# Use with Gunicorn
gunicorn -w 4 -b 0.0.0.0:8000 wsgi:app

🀝 Contributing

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is under the MIT License. See the LICENSE file for more details.

πŸ™ Acknowledgments

  • Flask team for the excellent framework
  • Python community for the amazing libraries

About

Flask project generator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages