Reusable Python templates for demo exam CRUD applications with PostgreSQL and Tkinter.
Project description
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
loginandpasswordfrom auserstable. - 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
pip install -e .
After publishing to PyPI:
pip install demexam-kit
Generate an exam project
demexam-new --preset store --out my_exam_app
cd my_exam_app
python app.py
Or use your own domain file:
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
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:
$env:DEMEXAM_DB_NAME="demo_exam"
$env:DEMEXAM_DB_USER="postgres"
$env:DEMEXAM_DB_PASSWORD="postgres"
Run generated SQL in pgAdmin first:
python app.py --print-sql
Before leaving the exam computer, if required by the rules:
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.
Project details
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 katicas-0.1.0.tar.gz.
File metadata
- Download URL: katicas-0.1.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8226f8f3bfd0958e8f5c29b475c797ec0b5a9a7a05ed800f7a262c9d1bdd68d8
|
|
| MD5 |
c07f22c9b72e938cf7d0be2df004cb46
|
|
| BLAKE2b-256 |
3438d382d5dd0d46c90987dc928a0fa33efb8aa50be3b4dfd5b5cd2e95bcf3bf
|
File details
Details for the file katicas-0.1.0-py3-none-any.whl.
File metadata
- Download URL: katicas-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdf2b6e7d5db54e0b015cbd23b94d24f777d32a314338baef7f9e45c7e1e7d1a
|
|
| MD5 |
b530bd0c78ee1e1a4664bd73397e1cc1
|
|
| BLAKE2b-256 |
8dc3a917da45806ea774a46acda1229f4aa1ff0324456998d04d23eb7bec828e
|