This release is a pre-release and may not be stable for production use.
pyside6-storybook
A small, Storybook-style component explorer for PySide6. Write stories, functions that build one widget in one state, and browse them in a gallery window: edit each story's arguments live, switch between light and dark themes, and see an error in place of a story that breaks instead of a crashed app.
Status: early release. Before 1.0, a minor release may change the API, and the changelog says so; see Versions and compatibility.
docs/roadmap.mddescribes what is planned next.
Install
pyside6-storybook needs Python 3.11 or newer and PySide6 6.8 or newer. Its only dependency is PySide6-Essentials, which a
project that already depends on the full PySide6 package satisfies.
pip install pyside6-storybook
or, as a development dependency of a project managed with uv:
uv add --dev pyside6-storybook
Until 0.1.0 is out, only a release candidate is on PyPI, and pip and uv skip pre-releases unless asked: use
pip install --pre pyside6-storybook or uv add --dev --prerelease allow pyside6-storybook. The development version installs from
GitHub with pip install git+https://github.com/Youth-Research-Center/pyside6-storybook.
uv installs it into the project's .venv without activating that environment, so with uv, put uv run in front of the
pyside6-storybook commands in this README (or activate .venv first).
Then open the built-in example stories:
pyside6-storybook --examples
With uv:
uv run pyside6-storybook --examples
Your first story
Create stories/greeting_story.py in your project:
from PySide6.QtWidgets import QPushButton, QWidget
from pyside6_storybook import BoolControl, StoryContext, TextControl, story
@story(
"Buttons/Greeting",
controls=[TextControl("text", "Hello!"), BoolControl("enabled", default=True)],
)
def greeting_button(ctx: StoryContext) -> QWidget:
"""A push button whose text and enabled state can be edited in the gallery."""
button = QPushButton(ctx.args["text"])
button.setEnabled(ctx.args["enabled"])
return button
and open it, with uv run in front when you installed with uv:
pyside6-storybook stories
@storyregisters the function under an id. The parts before the last/group stories (hereButtons); the last part is the story's name.- The gallery calls the function with a
StoryContext:ctx.argsholds the current value of each control, by name, andctx.themethe name of the active theme. The story is built again from scratch whenever a control or the theme changes.ctx.tokensholds the theme provider's design tokens (see Themes). - The function returns the widget to show. If it raises, or returns something that is not a widget, the gallery shows the error and its traceback in place of the widget, and the other stories keep working.
- Discovery picks up every file named
*_story.pyor*_stories.pybelow a folder. Story files can import your application, and each other, like any module of your project.
What's in it
Everything below is documented on the documentation site.
- Writing stories:
@story, ids and groups, theStoryContext, variants, layout and decorators. - Controls: text, bool, choice, int, float, colour, enum and file controls, edited live in the gallery.
- Finding stories: folders, files and modules,
[tool.pyside6-storybook]inpyproject.toml, entry points. - Command line: every option of
pyside6-storybook, and its exit codes. - The gallery: the window, keyboard shortcuts, canvas sizes and zoom, the Docs tab, the action log and hot reload.
- Themes: the built-in Light, Dark and System themes, your own themes through a theme provider, design tokens and styling.
- Testing stories: a pytest plugin that renders every story in every theme, accessibility and contrast checks,
screenshot snapshots and the
render_storyfixture. - Troubleshooting: load errors, duplicate ids, headless runs and fonts in CI.
- Versions and compatibility: the version policy, the public API and the supported Python and PySide6 versions.
- API reference and Changelog.
Licence
MIT. See LICENSE. PySide6, which pyside6-storybook depends on, is available under the LGPLv3, the GPLv3 or a commercial Qt licence.
The gallery's icons are Phosphor Icons (MIT), bundled in the package. See THIRD_PARTY_NOTICES.md.
pyside6-storybook is an independent project. It is not affiliated with or endorsed by The Qt Company or the Storybook project.
Metadata
Release files for pyside6-storybook 0.1.0rc1
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 |
|---|---|---|---|---|
| pyside6_storybook-0.1.0rc1.tar.gz | 637.7 kB | With provenance | Details for pyside6_storybook-0.1.0rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyside6_storybook-0.1.0rc1-py3-none-any.whl | Python 3 | none | any | Details for pyside6_storybook-0.1.0rc1-py3-none-any.whl |
Total release size: 815.3 kB
Release files / pyside6_storybook-0.1.0rc1.tar.gz
| Download URL | pyside6_storybook-0.1.0rc1.tar.gz |
|---|---|
| Size | 637.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8561f77b44a93c4dd1640632917bbe25310bccafc0ce3eed37546d7aaac85a38
|
|
BLAKE2b-256 checksum How to use checksums |
55e225fcc3570e05ed002a8169e58335a53dae1bb0fc30aa7a53f330131e7869
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / pyside6_storybook-0.1.0rc1-py3-none-any.whl
| Download URL | pyside6_storybook-0.1.0rc1-py3-none-any.whl |
|---|---|
| Size | 177.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ecc01d460c11d958de2a1350e36517d50880a3c70d38f5e830e34630d61f470
|
|
BLAKE2b-256 checksum How to use checksums |
f0e2a85fe79255627637e7e45e7eac753698fc0bab03feb827e03936703c14dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for pyside6-storybook 0.1.0rc1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pyside6_storybook-0.1.0rc1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA 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.