Metadata-Version: 2.4
Name: datapro-python-gui
Version: 0.1.0
Summary: Reusable DataPRO authentication + CustomTkinter GUI entry point for Python desktop apps
Author-email: Amatak Holdings Pty Ltd <contact@amatakholdings.com>
License: Proprietary
Project-URL: Homepage, https://github.com/amatak-cloud/datapro-python-gui
Project-URL: Repository, https://github.com/amatak-cloud/datapro-python-gui
Project-URL: Issues, https://github.com/amatak-cloud/datapro-python-gui/issues
Project-URL: Documentation, https://docs.uniqueedge.net
Keywords: datapro,authentication,login,gui,customtkinter,tkinter,desktop
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: MacOS X
Classifier: Environment :: Win32 (MS Windows)
Classifier: Environment :: X11 Applications
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LICENSE.spdx
Requires-Dist: customtkinter>=5.2
Requires-Dist: requests>=2.28
Provides-Extra: dotenv
Requires-Dist: python-dotenv>=1.0; extra == "dotenv"
Provides-Extra: dev
Requires-Dist: python-dotenv>=1.0; extra == "dev"
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: pytest-cov>=4; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=4; extra == "dev"
Dynamic: license-file

# 🔐 datapro-python-gui

**Reusable DataPRO authentication + CustomTkinter GUI entry point for Python desktop apps.**

<div align="center">

![Version](https://img.shields.io/badge/version-0.1.0-blue)
![Python](https://img.shields.io/badge/python-3.9%2B-green)
![License](https://img.shields.io/badge/license-Proprietary-red)
![Category](https://img.shields.io/badge/category-Auth%20%7C%20Desktop%20GUI-orange)

</div>

## 🔗 Quick Navigation

| Section | Description |
|---------|-------------|
| [✨ Features](#-features) | What the package provides |
| [🚀 Installation](#-installation) | pip install and requirements |
| [📖 Usage](#-usage) | Three integration patterns |
| [🎨 Branding](#-branding-the-login-window) | Customize look & feel per app |
| [⚙️ Configuration](#️-configuration) | Config dict vs environment variables |
| [🏗️ Development](#️-development) | Editable install, tests, build |
| [📁 Structure](#-project-structure) | Package layout |
| [⚖️ License](#️-license--copyright) | Terms of use |

---

## 📋 Overview

**datapro-python-gui** is a small, dependency-light library that gives any Python
desktop app a ready-made **DataPRO sign-in flow** plus a hardened CustomTkinter
**window launcher**. It handles:

- talking to the DataPRO REST API (`/auth/login`, `/auth/password`)
- persisting and reusing a session token per app
- showing a modal, brandable login dialog
- creating, centering, focusing, and revealing the main CTk window

You bring your app's UI (or none at all). The library brings the authentication
and window plumbing.

---

## ✨ Features

### 🔑 DataPRO authentication
REST-based login with token sanitization, atomic session persistence, and
password-update support using owner credentials.

### 🖼️ Brandable login dialog
One `LoginWindow` class, fully themable per app via kwargs — accent color,
logo emoji, tagline, footer, copyright, window size.

### 🪟 Hardened window launcher
`launch_studio()` handles the deiconify → center → lift → focus → on-top →
redraw sequence that desktop apps need on Windows/macOS.

### 💾 Per-app session isolation
Each downstream app gets `~/.<app_name>/session.json` — no session collisions
when multiple DataPRO-backed apps share one machine.

### 🔒 Zero secrets in the wheel
Configuration comes from a `config=` dict or `DATAPRO_*` environment variables.
No `.env` is ever bundled, read, or written by the library.

### 🐍 Modern Python
Python 3.9+, `pyproject.toml` (PEP 621), src-layout, optional `[dotenv]` extra.

---

## 🚀 Installation

### Requirements

- **Python 3.9+** (3.10 or newer recommended)
- **pip**
- **OS**: Windows 10/11, macOS 10.15+, or Linux with Tk support
- **Display**: a graphical session (this is a desktop GUI library)

### From PyPI

```bash
pip install datapro-python-gui
