pyqt6-template-widgets
Template-based widgets and form helpers for PyQt6 applications. The library helps build simple data-driven interfaces from reusable card, list and form templates.
CardTemplate— card layout in a list;FormTemplateandFormField— add/edit form;TemplateListPage— list with search, filter, sort, CRUD;PageManager— switch between login and list screens;- partner-management preset on top of the template widgets;
- calculation helpers for sample business rules.
Installation
pip install pyqt6-template-widgets
Template window
from pyqt6_templates import CardTemplate, FormField, FormTemplate, TemplateListWindow
items = [
{
"partner_type": "Дилер",
"name": "ООО Ромашка",
"director": "Иванов Иван Иванович",
"phone": "+7 223 322 22 32",
"rating": 10,
"discount": 10,
}
]
card_template = CardTemplate(
title="{partner_type} | {name}",
lines=["{director}", "{phone}", "Рейтинг: {rating}"],
badge="{discount}%",
)
form_template = FormTemplate(
title_create="Добавить партнера",
title_edit="Редактировать партнера",
fields=[
FormField("name", "Наименование:", required=True),
FormField("partner_type", "Тип:", kind="choice", choices=["Дилер", "Оптовик"]),
FormField("rating", "Рейтинг:", kind="number", minimum=0),
FormField("director", "Директор:", required=True),
FormField("phone", "Телефон:", required=True),
],
)
window = TemplateListWindow(
title="Список партнеров",
items=items,
card_template=card_template,
form_template=form_template,
)
window.run()
See examples/template_window.py.
Full shoe store app (login + products + orders)
After install:
pip install pyqt6-template-widgets
pyqt6-shoe-store
Other ways to run:
python -m pyqt6_templates.apps
python -m pyqt6_templates.apps.shoe_store
Open the application source (login, list pages, main window):
python -c "from pyqt6_templates.apps import app_source_path; print(app_source_path())"
Test accounts: client1/123, manager1/123, admin1/123, or guest login.
From a git checkout:
python examples/shoe_store.py
Partner preset
from pyqt6_templates import Partner, PartnerListWindow
partner = Partner(
partner_type="Дилер",
name="ООО Ромашка",
director="Иванов Иван Иванович",
phone="+7 223 322 22 32",
rating=10,
total_sales=62000,
)
window = PartnerListWindow(
partners=[partner],
partner_types=["Дилер", "Оптовик"],
)
window.run()
Calculation helpers
from pyqt6_templates import calculate_partner_discount, calculate_required_material
discount = calculate_partner_discount(62000)
material = calculate_required_material(
product_type_id=1,
material_type_id=2,
product_count=10,
parameter_1=2.5,
parameter_2=3.0,
product_type_coefficients={1: 1.2},
material_defect_rates={2: 0.05},
)
PyPI build
python -m pip install build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*
See docs/PYPI_UPDATE.md for version bump workflow.
What's new in 0.3.0
- full shoe store app bundled:
pyqt6-shoe-storecommand form_helpers:open_form_window,close_form,check_role,confirm_delete- English hover docstrings on all main API
pyqt6_templates.apps.shoe_store— complete reference application
Metadata
Release files for pyqt6-template-widgets 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyqt6_template_widgets-0.3.0.tar.gz | 25.1 kB | Without provenance | Details for pyqt6_template_widgets-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyqt6_template_widgets-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for pyqt6_template_widgets-0.3.0-py3-none-any.whl |
Total release size: 58.6 kB
Release files / pyqt6_template_widgets-0.3.0.tar.gz
| Download URL | pyqt6_template_widgets-0.3.0.tar.gz |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbccf4fa580a89f874bd41106a0be588537d7cff727175151fbb8918c1a7d956
|
|
BLAKE2b-256 checksum How to use checksums |
5e4643d1231dcf5eb78539e38c61af91f2ef4007aba66dffb957d7a9afa10f4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / pyqt6_template_widgets-0.3.0-py3-none-any.whl
| Download URL | pyqt6_template_widgets-0.3.0-py3-none-any.whl |
|---|---|
| Size | 33.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
556c7e9293593e3a39545bb99704c1e6f1d387325023ce1592b22801695d0ad1
|
|
BLAKE2b-256 checksum How to use checksums |
0333029a7e1fb04758763dfb23b4f627da19466c89b41becb26974b7fc0a430f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for pyqt6-template-widgets 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.