PyAwaish is a Flask-based Python framework that simplifies creating MySQL-powered web applications with dynamic configuration, RESTful APIs, and CRUD operations.
- 🔧 Dynamic MySQL configuration via web UI
- 🧩 Template rendering (
templates/support) - 🔄 Query execution via POST APIs
- ✍️ CRUD operations (Insert, Delete, Update, Fetch)
- 🌐 RESTful Flask endpoints
- 🔐 Environment variable support for secure configuration
git clone https://github.com/abuawaish/PyAwaish.git
cd PyAwaish
pip install -r requirements.txt
pip install PyAwaishexport MYSQL_HOST=localhost
export MYSQL_USER=root
export MYSQL_PASSWORD=your_password
export MYSQL_DB=mydatabase
export SECRET_KEY=your_secret_keyfrom PyAwaish.MysqlApplication import MysqlApplication
if __name__ == "__main__":
app = MysqlApplication(secret_key="your_secret_key")
app.execute(debug_mode=True, port_number=8080, host_address="127.0.0.1")| Method | Example |
| ------------------ | ---------------------------------------------- |
| `.env` (full path) | `MysqlApplication(secret_key=r"C:\path\.env")` |
| `.env` (local) | `MysqlApplication(secret_key=".env")` |
| No key (default) | `MysqlApplication()` |
| Custom string | `MysqlApplication(secret_key="key")` |
SECRET_KEY="YOUR_SECRET_KEY"| Endpoint | Description |
| ---------------- | ----------------------- |
| `/` | MySQL config page |
| `/home` | Home page |
| `/config_mysql` | POST - Configure MySQL |
| `/execute_query` | POST - Execute SQL/CRUD |{
"operation": "insert",
"table_name": "users",
"columns": "name, email",
"values": "'John Doe', 'john@example.com'"
}- Supported Operations:
insert,delete,update,fetch_data,show_tables
-
Flask
-
Flask-MySQLdb
-
python-dotenv
pip install PyAwaish