Metadata-Version: 2.4
Name: katicas
Version: 0.1.0
Summary: Reusable Python templates for demo exam CRUD applications with PostgreSQL and Tkinter.
Author: Demo Exam Student
License: MIT
Keywords: demo-exam,crud,postgresql,tkinter,template
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: psycopg2-binary>=2.9.9

# demexam-kit

`demexam-kit` is a PyPI-ready helper library for building demo exam desktop apps in Python.
It is domain-neutral: the same code can become a shoe store, restaurant, zoo, library, hotel, clinic, or warehouse app by changing a JSON specification.

## What it gives you

- PostgreSQL connection helper for pgAdmin-created databases.
- Login by `login` and `password` from a `users` table.
- Role-based access: guest, client, manager, administrator.
- Tkinter UI with required exam-style screens: login, entity list, search, filtering, sorting, CRUD.
- SQL generator for users, roles and your main entities.
- Project generator: `demexam-new`.

Russian documentation:

- `GUIDE_RU.md` - detailed usage, exam workflow and PyPI notes.
- `MODULES_RU.md` - explanation of every module.
- `examples/custom_template.json` - blank domain template.

## Install locally while testing

```bash
pip install -e .
```

After publishing to PyPI:

```bash
pip install demexam-kit
```

## Generate an exam project

```bash
demexam-new --preset store --out my_exam_app
cd my_exam_app
python app.py
```

Or use your own domain file:

```bash
demexam-new --spec restaurant.json --out restaurant_app
```

The generated project is standalone: it contains a local `examlib` folder, so the app does not break after removing the installed generator package.

## Database environment variables

```bash
set DEMEXAM_DB_NAME=demo_exam
set DEMEXAM_DB_USER=postgres
set DEMEXAM_DB_PASSWORD=postgres
set DEMEXAM_DB_HOST=localhost
set DEMEXAM_DB_PORT=5432
```

On PowerShell:

```powershell
$env:DEMEXAM_DB_NAME="demo_exam"
$env:DEMEXAM_DB_USER="postgres"
$env:DEMEXAM_DB_PASSWORD="postgres"
```

Run generated SQL in pgAdmin first:

```bash
python app.py --print-sql
```

Before leaving the exam computer, if required by the rules:

```bash
pip uninstall demexam-kit -y
```

Do not delete the generated project files you wrote for the solution.

## Domain idea

The task changes words, not the architecture:

- Store: products, orders, clients.
- Restaurant: dishes, tables, bookings/orders.
- Zoo: animals, enclosures, visits.
- Library: books, readers, loans.

Change `spec.json`, keep the code.

## Important

No package can guarantee passing an exam by itself. This library is meant to save time on repetitive CRUD, auth, PostgreSQL and Tkinter structure so you can adapt the app quickly to the exact task.
