Metadata-Version: 2.4
Name: sqlite-sh
Version: 0.1.3
Summary: SQLite-backed Tkinter shoe shop demo application
Author-email: adwedelf <adwedelf@users.noreply.github.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/tgoaty/demo-ex
Project-URL: Repository, https://github.com/tgoaty/demo-ex
Keywords: sqlite,tkinter,demo,shop
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# sqlite-sh

`sqlite-sh` is a small educational Tkinter desktop application backed by SQLite.
It includes a shoe shop catalog, role-based login, products, orders, database schema, and exam diagrams.

## Install

```bash
pip install sqlite-sh
```

## Run

```bash
shop
```

## Build Windows exe

After installing the package in a Windows virtual environment:

```bat
pip install --upgrade sqlite-sh pyinstaller
pyinstaller --noconfirm --windowed --name shop --collect-all sqlite_sh --icon ".venv\Lib\site-packages\sqlite_sh\assets\Icon.ico" ".venv\Lib\site-packages\sqlite_sh\pyinstaller_entry.py"
```

Run the built app:

```bat
dist\shop\shop.exe
```

Detailed usage is also installed inside the package as `sqlite_sh/USAGE.md`.

On first import/run, the packaged seed database is copied to:

```text
~/.sqlite_sh/shop.db
```

You can override the writable database folder:

```bash
SQLITE_SH_HOME=/path/to/folder shop
```

## Admin credentials

```text
Login: 94d5ous@gmail.com
Password: uzWC67
```

## Included files

The installed package contains:

- `assets/` with icons and images;
- `data/shop.db` seed SQLite database;
- `database.sql` schema;
- `algorithm_flowchart_gost.pdf`;
- `db_uml_diagram.pdf`.

Product photos can be stored as PNG files. If the database still contains a
name like `1.jpg`, the app also tries `1.png` with the same base name.

To find the installed package folder:

```bash
python -c "import sqlite_sh, pathlib; print(pathlib.Path(sqlite_sh.__file__).parent)"
```

## Build locally

```bash
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
```

## Upload flow

TestPyPI first:

```bash
python -m twine upload --repository testpypi dist/*
```

PyPI:

```bash
python -m twine upload dist/*
```

## Easy DB diagram

Create a browser-ready HTML/SVG database diagram without extra tools:

```bash
sqlite-sh-diagram
```

This writes `db_diagram.html`, which can be opened directly in Edge or any modern browser. Mermaid output is still available:

```bash
sqlite-sh-diagram --format mermaid -o db_diagram.mmd
```
