Skip to main content

Write Storybook stories in Python - Typings for Storybook and the Component Story Format (CSF)

Project description

storybook-csf

PyPI - Version PyPI - Python Version PyPI - License PyPI - Downloads GitHub Actions Workflow Status

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

storybook_csf-1.0.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

storybook_csf-1.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

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

Hashes for storybook_csf-1.0.1.tar.gz
Algorithm Hash digest
SHA256 988b42da9d0675ab926bb7c202397dc3a36087daad0a6e726f1cafb84b190d70
MD5 ff3095c6973091d74df768b30a2a9d2f
BLAKE2b-256 7e8798ae47726d7abe39254b6f8ff1fa4203483d6d95016e4a3d99cb7098c4c2

See more details on using hashes here.

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

Hashes for storybook_csf-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3beac0d22bcef9cd72ba8f941db59906ff8b33ead6f3eca4a96a475a76e7a9d
MD5 40771b126998f20b160281e0e0a374d5
BLAKE2b-256 2eada10c031b2978644791a94fb019d6c9e7d594b24ba585ff398aad8df4bd5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page