fry-qt6-image-widget
fry-qt6-image-widget is a PyQt6 image viewing and annotation widget. The core class is FryCanvas, and it inherits from QtWidgets.QWidget, so it can be placed directly into a layout, a QMainWindow, a QScrollArea, or wrapped by the application as a QDockWidget when needed.
The package intentionally exposes a widget, not a dock. Dock behavior belongs to the host application.
Install
pip install fry-qt6-image-widget
For local development:
python -m pip install -e ".[dev]"
python -m pytest
Quick Start
import sys
import numpy as np
from PyQt6 import QtWidgets
from fry_qt6_image_widget import FryCanvas
app = QtWidgets.QApplication(sys.argv)
canvas = FryCanvas()
canvas.resize(900, 600)
canvas.setViewMode()
image = np.ones((480, 640, 3), dtype=np.uint8) * 255
canvas.show_image_np(image, description="white demo image")
canvas.show()
sys.exit(app.exec())
Common Imports
from fry_qt6_image_widget import (
FryCanvas,
FryCanvasMode,
create_shape,
)
Backward-compatible imports are also available:
from fry_base_classes import FryCanvas
Typical Operations
canvas = FryCanvas()
canvas.show_image("demo.png")
canvas.show_image_np(image_np)
image_np = canvas.get_image_np()
canvas.set_canvas_mode("view")
canvas.set_canvas_mode("draw")
canvas.set_shape_type("rectangle")
shape = create_shape("rectangle", label="box")
canvas.append_shape(shape)
all_shapes = canvas.get_all_shapes_data()
Supported shape type strings include polygon, rectangle, circle, line, linestrip, point, points, mask, and brush.
Examples
- examples/basic_widget.py: create a
FryCanvaswidget and show a NumPy image. - examples/embed_in_main_window.py: embed the widget into a normal
QMainWindowwith a small toolbar. - examples/wrap_as_dock.py: optional host-app code showing how to wrap the widget as a dock outside the package.
Core Notes
The key concepts and integration notes are documented in docs/CORE_CONCEPTS.md.
Build a pip Package
python -m pip install build twine
python -m build
python -m twine check dist/*
This produces a source distribution and a wheel in dist/. To publish to PyPI, run:
python -m twine upload dist/*
Publishing needs a PyPI account and token, so the repository is prepared for upload but credentials are not stored in the project.
Metadata
Release files for fry-qt6-image-widget 0.2.1
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 |
|---|---|---|---|---|
| fry_qt6_image_widget-0.2.1.tar.gz | 125.9 kB | Without provenance | Details for fry_qt6_image_widget-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fry_qt6_image_widget-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for fry_qt6_image_widget-0.2.1-py3-none-any.whl |
Total release size: 296.3 kB
Release files / fry_qt6_image_widget-0.2.1.tar.gz
| Download URL | fry_qt6_image_widget-0.2.1.tar.gz |
|---|---|
| Size | 125.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b400b46b97df19205462f63e6f759ad371dcf3d1464471f2fc4351bd5914cd00
|
|
BLAKE2b-256 checksum How to use checksums |
001a325a504e0ab85bee478dff03891d3acf04f97b4277cd038b45fc25935712
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / fry_qt6_image_widget-0.2.1-py3-none-any.whl
| Download URL | fry_qt6_image_widget-0.2.1-py3-none-any.whl |
|---|---|
| Size | 170.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2430a3dbf216ff9c308a2ef21028852e711a8885278a2eb9e377dce65b8af04
|
|
BLAKE2b-256 checksum How to use checksums |
355733cbdd8a70c2d8d08249c090dd69321680787ce24f4579508a5f1e306a60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for fry-qt6-image-widget 0.2.1
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.