Write Storybook stories in Python - Typings for Storybook and the Component Story Format (CSF)
Project description
storybook-csf
Write Storybook stories in Python - Typings for Storybook's Component Story Format (CSF) v3.
The types defined in this package allow you to write Storybook's CSF format in your Python projects. See included types here.
NOTE: The types defined in this package are a JSON-compatible subset of CSF. Fields that require JS-specific types are not included.
from storybook_csf import ComponentAnnotations, ProjectAnnotations, StoryAnnotations
# This will be typed
data: ComponentAnnotations = {
"title": "Component",
"parameters": {
"options": { "component": "my_widget" }
},
# `stories` field is specific to Storybook for Server
# See https://github.com/storybookjs/storybook/tree/next/code/frameworks/server-webpack5
"stories": [
{
"name": "Default",
"parameters": {
"server": { "id": "path/of/your/story" }
}
}
]
}
Installation
pip install storybook-csf
Release notes
Read the Release Notes to see the latest features and fixes.
Development
Tests
To run tests, use:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file storybook_csf-1.0.1.tar.gz.
File metadata
- Download URL: storybook_csf-1.0.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
988b42da9d0675ab926bb7c202397dc3a36087daad0a6e726f1cafb84b190d70
|
|
| MD5 |
ff3095c6973091d74df768b30a2a9d2f
|
|
| BLAKE2b-256 |
7e8798ae47726d7abe39254b6f8ff1fa4203483d6d95016e4a3d99cb7098c4c2
|
File details
Details for the file storybook_csf-1.0.1-py3-none-any.whl.
File metadata
- Download URL: storybook_csf-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3beac0d22bcef9cd72ba8f941db59906ff8b33ead6f3eca4a96a475a76e7a9d
|
|
| MD5 |
40771b126998f20b160281e0e0a374d5
|
|
| BLAKE2b-256 |
2eada10c031b2978644791a94fb019d6c9e7d594b24ba585ff398aad8df4bd5e
|