storybook-csf


Namestorybook-csf JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryWrite Storybook stories in Python - Typings for Storybook and the Component Story Format (CSF)
upload_time2025-02-13 21:30:26
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.8
licenseMIT
keywords storybook server types csf
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # storybook-csf

[![PyPI - Version](https://img.shields.io/pypi/v/storybook-csf)](https://pypi.org/project/storybook-csf/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/storybook-csf)](https://pypi.org/project/storybook-csf/) [![PyPI - License](https://img.shields.io/pypi/l/storybook-csf)](https://github.com/jurooravec/storybook-csf/blob/main/LICENSE) [![PyPI - Downloads](https://img.shields.io/pypi/dm/storybook-csf)](https://pypistats.org/packages/storybook-csf) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/jurooravec/storybook-csf/tests.yml)](https://github.com/jurooravec/storybook-csf/actions/workflows/tests.yml)

Write Storybook stories in Python - Typings for Storybook's [Component Story Format (CSF) v3](https://storybook.js.org/docs/api/csf).

The types defined in this package allow you to write Storybook's CSF format in your Python projects.
[See included types here](https://github.com/jurooravec/storybook-csf/blob/main/src/storybook_csf/story.py).

> NOTE: The types defined in this package are a JSON-compatible subset of CSF. Fields that require
> JS-specific types are not included.

```python
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

```bash
pip install storybook-csf
```

## Release notes

Read the [Release Notes](https://github.com/jurooravec/storybook-csf/tree/main/CHANGELOG.md)
to see the latest features and fixes.

## Development

### Tests

To run tests, use:

```bash
pytest
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "storybook-csf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "storybook, server, types, csf",
    "author": null,
    "author_email": "Juro Oravec <juraj.oravec.josefson@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/52/f7/44d9fb2bf6d1dbe824d5a3e3dc280dc0ab625d331310a8f6024f4b42be45/storybook_csf-1.0.0.tar.gz",
    "platform": null,
    "description": "# storybook-csf\n\n[![PyPI - Version](https://img.shields.io/pypi/v/storybook-csf)](https://pypi.org/project/storybook-csf/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/storybook-csf)](https://pypi.org/project/storybook-csf/) [![PyPI - License](https://img.shields.io/pypi/l/storybook-csf)](https://github.com/jurooravec/storybook-csf/blob/main/LICENSE) [![PyPI - Downloads](https://img.shields.io/pypi/dm/storybook-csf)](https://pypistats.org/packages/storybook-csf) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/jurooravec/storybook-csf/tests.yml)](https://github.com/jurooravec/storybook-csf/actions/workflows/tests.yml)\n\nWrite Storybook stories in Python - Typings for Storybook's [Component Story Format (CSF) v3](https://storybook.js.org/docs/api/csf).\n\nThe types defined in this package allow you to write Storybook's CSF format in your Python projects.\n[See included types here](https://github.com/jurooravec/storybook-csf/blob/main/src/storybook_csf/story.py).\n\n> NOTE: The types defined in this package are a JSON-compatible subset of CSF. Fields that require\n> JS-specific types are not included.\n\n```python\nfrom storybook_csf import ComponentAnnotations, ProjectAnnotations, StoryAnnotations\n\n# This will be typed\ndata: ComponentAnnotations = {\n    \"title\": \"Component\",\n    \"parameters\": {\n        \"options\": { \"component\": \"my_widget\" }\n    },\n    # `stories` field is specific to Storybook for Server\n    # See https://github.com/storybookjs/storybook/tree/next/code/frameworks/server-webpack5\n    \"stories\": [\n        {\n            \"name\": \"Default\",\n            \"parameters\": {\n                \"server\": { \"id\": \"path/of/your/story\" }\n            }\n        }\n    ]\n}\n```\n\n## Installation\n\n```bash\npip install storybook-csf\n```\n\n## Release notes\n\nRead the [Release Notes](https://github.com/jurooravec/storybook-csf/tree/main/CHANGELOG.md)\nto see the latest features and fixes.\n\n## Development\n\n### Tests\n\nTo run tests, use:\n\n```bash\npytest\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Write Storybook stories in Python - Typings for Storybook and the Component Story Format (CSF)",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/jurooravec/storybook-csf/"
    },
    "split_keywords": [
        "storybook",
        " server",
        " types",
        " csf"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "755b32a0944b2fc232d729c7c35d43164f3f822c4473f5a46ee52a4c63e1c5d0",
                "md5": "c3c2a7d0cc169023f6fdedfbbde7de2c",
                "sha256": "4ff3a21cfd94dac7bc28e427fcc9ecf37325bda9d7fee93ce8307757363eb906"
            },
            "downloads": -1,
            "filename": "storybook_csf-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c3c2a7d0cc169023f6fdedfbbde7de2c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 5934,
            "upload_time": "2025-02-13T21:30:25",
            "upload_time_iso_8601": "2025-02-13T21:30:25.043231Z",
            "url": "https://files.pythonhosted.org/packages/75/5b/32a0944b2fc232d729c7c35d43164f3f822c4473f5a46ee52a4c63e1c5d0/storybook_csf-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "52f744d9fb2bf6d1dbe824d5a3e3dc280dc0ab625d331310a8f6024f4b42be45",
                "md5": "4a3e5732549f90e015946fa9107334f7",
                "sha256": "e28b1e5735e5f501f4bcd5dfbceebde629af06286a1d72e8df7a0b1eab2db9da"
            },
            "downloads": -1,
            "filename": "storybook_csf-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4a3e5732549f90e015946fa9107334f7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 5870,
            "upload_time": "2025-02-13T21:30:26",
            "upload_time_iso_8601": "2025-02-13T21:30:26.251513Z",
            "url": "https://files.pythonhosted.org/packages/52/f7/44d9fb2bf6d1dbe824d5a3e3dc280dc0ab625d331310a8f6024f4b42be45/storybook_csf-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-13 21:30:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jurooravec",
    "github_project": "storybook-csf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "storybook-csf"
}
        
Elapsed time: 0.46668s