Metadata-Version: 2.4
Name: stdd
Version: 0.1.0
Summary: Universal template for PyQt6 + PyMySQL applications with role-based access control
Home-page: https://github.com/yourusername/std
Author: Your Name
Author-email: Angelina <mayshmellina@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/LiiraGH/std
Project-URL: Documentation, https://github.com/LiiraGH/std#readme
Project-URL: Repository, https://github.com/LiiraGH/std
Project-URL: Issues, https://github.com/LiiraGH/std/issues
Keywords: pyqt6,pymysql,template,gui,database,role-based-access
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyQt6>=6.6.0
Requires-Dist: PyMySQL>=1.1.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# 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.py` file
- 🔒 **SQL Injection Protection** - Parameterized queries throughout

## Quick Start

### Installation

```bash
pip install stdd
```

### Basic Usage

#### Using Templates

1. Copy the template files to your project directory
2. Configure `config.py` with your database settings and table names
3. Create your database structure
4. Customize SQL queries in the window modules
5. Run your application

#### Using Examples

After installation, you can access the example application:

```python
# 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`:

```python
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

```python
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**

