Universal template for PyQt6 + PyMySQL applications with role-based access control
Project description
PyQt Template App
Universal template for creating PyQt6 + PyMySQL applications with role-based access control (Admin, Manager, Client).
Features
- 🎯 Universal Template - Easily adaptable to any domain (hotels, car rentals, e-commerce, etc.)
- 🔐 Role-Based Access - Built-in support for Admin, Manager, and Client roles
- 📊 Complete GUI - Full-featured PyQt6 interface with tabs and forms
- 🗄️ Database Integration - Ready-to-use PyMySQL integration
- ⚙️ Centralized Configuration - All settings in one
config.pyfile - 🔒 SQL Injection Protection - Parameterized queries throughout
Quick Start
Installation
pip install stdd
Basic Usage
Using Templates
- Copy the template files to your project directory
- Configure
config.pywith your database settings and table names - Create your database structure
- Customize SQL queries in the window modules
- Run your application
Using Examples
After installation, you can access the example application:
# Access example files
import std.examples.main as example_app
# or find them at: site-packages/std/examples/
Project Structure
std/
├── config.py # Configuration (START HERE!)
├── template_db.py # Database module
├── template_main.py # Entry point
├── template_login_window.py # Login window
├── template_admin_window.py # Admin window
├── template_manager_window.py # Manager window
├── template_client_window.py # Client window
├── example_database_structure.sql # Example database structure
├── README_template.md # Detailed instructions
└── examples/ # Working example application
├── main.py # Example entry point
├── db.py # Example database module
├── login_window.py # Example login window
├── admin_window.py # Example admin window
├── manager_window.py # Example manager window
└── client_window.py # Example client window
Configuration
All settings are in config.py:
DB_CONFIG = {
'host': 'localhost',
'user': 'root',
'password': 'root',
'database': 'your_database',
'charset': 'utf8mb4'
}
TABLES = {
'users': 'users',
'roles': 'roles',
'items': 'items', # Your main entity table
'orders': 'orders', # Your orders/bookings table
# ... more tables
}
Example: Car Rental System
TABLES = {
'users': 'users',
'roles': 'roles',
'items': 'cars', # cars instead of items
'orders': 'rentals', # rentals instead of orders
'categories': 'car_types', # car types instead of categories
# ...
}
Requirements
- Python >= 3.8
- PyQt6 >= 6.6.0
- PyMySQL >= 1.1.0
License
MIT License - see LICENSE file for details
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues, questions, or suggestions, please open an issue on GitHub.
Made with ❤️ for the Python community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stdd-0.1.0.tar.gz.
File metadata
- Download URL: stdd-0.1.0.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8e073ed45126cfc49cf931d8e2accfac8c15d4a4649adf6e63fc02872c04753
|
|
| MD5 |
0cccd5de09a15e0c402d43fbc084164d
|
|
| BLAKE2b-256 |
b3bf9b03068c03df33e239450cc98f90710ff841479acb3dcbdc6099e20dcb6a
|
File details
Details for the file stdd-0.1.0-py3-none-any.whl.
File metadata
- Download URL: stdd-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
806aa2bf756e1665a38f0eb5761d545acafb0c74f51b729921ff9488ac360d7a
|
|
| MD5 |
b8368765862d24a04a22a3f931e642f0
|
|
| BLAKE2b-256 |
87ebe49537bb62b80d70613ffbe0e6f0d739de005bd91eb6569595a089016a02
|