Skip to main content

DeskKit

DeskKit — конструктор десктоп-приложений на Qt (PySide6 / PyQt6) и MySQL. Собирайте приложение из модулей, экспортируйте автономный проект с чистым Python-кодом.

Установка

pip install deskkit[pyside]   # PySide6
pip install deskkit[pyqt]     # PyQt6

Конструктор (AppBuilder)

Приложение собирается блоками — включайте только нужное:

from deskkit import AppBuilder

AppBuilder("Склад")
    .database("warehouse_db", password="secret")
    .with_auth(guest=False)       # авторизация без гостя
    .with_search()                # поиск
    .with_filter("supplier", "category")  # фильтры
    .with_sort("stock_quantity")  # сортировка
    .with_crud()                  # добавление / изменение / удаление
    .with_formatting()            # условное оформление строк
    .export("my_warehouse", tips=True, flowchart=True)
    .run()

Отключение блоков

AppBuilder("Витрина")
    .database("shop_db")
    .without_auth()        # сразу каталог, без входа
    .without_crud()        # только просмотр
    .without_filters()
    .without_sort()
    .export("vitrina", tips=False)
    .run()

Готовые профили предметных областей

from deskkit import AppBuilder

AppBuilder.from_preset("library").export("biblio").run()
AppBuilder.from_preset("warehouse").database("wh").export("sklad").run()
AppBuilder.from_preset("cinema").export("kino").run()

Доступные профили: shop, library, warehouse, autoservice, cinema.

Экспорт автономного проекта

По умолчанию export_project=True — создаётся папка с обычным кодом (без import deskkit):

my_app/
├── main.py
├── settings.py          # модули вкл/выкл в классе Features
├── database.py
├── ui/
├── sql/database.sql
├── docs/flowchart.svg   # блок-схема ГОСТ 19.701-90 (если flowchart=True)
├── tips/                # подсказки по модулям (если tips=True)
└── requirements.txt
Параметр По умолчанию Описание
export_project True Экспорт автономного проекта
include_tips True Папка tips/ с подсказками
include_flowchart True SVG блок-схема в docs/
run_generated True Запустить проект после экспорта

Блок-схема (ГОСТ 19.701-90)

from deskkit import AppConfig, save_flowchart, generate_flowchart

cfg = AppBuilder("Приложение").build()
save_flowchart(cfg, "docs/flowchart.svg")

svg = generate_flowchart(cfg)  # строка SVG

Символы: овал — начало/конец, прямоугольник — процесс, ромб — условие, параллелограмм — ввод/вывод.
PDF: откройте SVG в браузере → «Печать» → «Сохранить как PDF».

Модули приложения

Блок Метод конструктора Описание
Авторизация with_auth() / without_auth() Вход по логину из БД
Гость with_auth(guest=True/False) Кнопка «без авторизации»
Поиск with_search() По всем текстовым полям
Фильтр поставщика with_filter("supplier") Выпадающий список
Фильтр категории with_filter("category") Выпадающий список
Сортировка with_sort("поле") Кнопка ↑↓
CRUD with_crud() Форма редактирования
Роли with_roles() Разный UI для ролей
Форматирование with_formatting() Цвет строк по условиям

Конфигурация через JSON

from deskkit import AppConfig, ShopApp

ShopApp(AppConfig.from_json("app.json")).run()
{
  "title": "Каталог",
  "database": "my_db",
  "password": "",
  "features": {
    "auth": true,
    "search": true,
    "supplier_filter": true,
    "sort": true,
    "crud": true
  },
  "include_tips": true,
  "include_flowchart": true,
  "output_dir": "my_app"
}

Лицензия

MIT

Release files for deskkit 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deskkit 1.2.2
File Size Uploaded
deskkit-1.2.2.tar.gz 35.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deskkit 1.2.2
File Interpreter ABI Platform
deskkit-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 79.6 kB

Release files / deskkit-1.2.2.tar.gz

Download URL deskkit-1.2.2.tar.gz
Size 35.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c80e8e34489b5632d25ebe9e1e4d3bec18427d3094a49f18633c2b646c552a6e
BLAKE2b-256 checksum
How to use checksums
4b35e595ba27bf79914435ed6506c5779bf69a752ec6d04d0f4eff10318f70dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / deskkit-1.2.2-py3-none-any.whl

Download URL deskkit-1.2.2-py3-none-any.whl
Size 44.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
739f74470004f31cc8d74f7dd89f3d218b0b352d5874846041c970e5827305db
BLAKE2b-256 checksum
How to use checksums
b8f30b54b5b12212661db279459943fa9a03c3bbff729ba15997b25b18bc48aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release history Release notifications | RSS feed

1.3.1

2 release files

1.3.0

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page