StoryWeaver
Overview
StoryWeaver sets up a React environment with Storybook for component-driven development and testing. It includes an integrated FastAPI server to mock API responses using user-generated JSON files. The setup script automates Storybook configuration, story generation for React components, and optional FastAPI mock server startup, enhancing the development workflow.
Features
- Storybook Integration: Automatically configures Storybook for your React project.
- Story Generation: Generates story files for each React component.
- API Mocking: Uses FastAPI to mock API responses from user-provided JSON files.
Installation
-
Clone the Repository
git clone https://github.com/yourusername/storyweaver.git cd storyweaver
-
Install Dependencies
Using Poetry:
poetry install -
Initialize Your React Project
If you haven't already, set up your React project and install Storybook:
npx create-react-app my-project cd my-project npx sb init
Usage
-
Setup Storybook and Generate Stories
poetry run python setup_storybook.py path/to/components
-
Optionally, Start the FastAPI Mock Server
poetry run python setup_storybook.py path/to/components --mock
-
Run Storybook
npm run storybook
Project Structure
- setup_storybook.py: Script to configure Storybook and generate stories.
- mock_api.py: FastAPI server script to mock API responses.
- mock_api: Directory containing user-generated JSON files for API responses.
Contributing
Contributions are welcome! Please open an issue or submit a pull request with your changes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for storyweaver 0.1.0
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 | |
|---|---|---|---|---|
| storyweaver-0.1.0.tar.gz | 3.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| storyweaver-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / storyweaver-0.1.0.tar.gz
| Download URL | storyweaver-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f51d89f9988cb7fedc95c2083a5a7dd0f625d11231624d480927863593127806
|
|
BLAKE2b-256 checksum How to use checksums |
84e834a6cdf9b9105eae581b65c99502a73d06b6a95285bc3e456cf13c9cfeb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/5.15.146.1-microsoft-standard-WSL2
|
Release files / storyweaver-0.1.0-py3-none-any.whl
| Download URL | storyweaver-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7715e976da58883de96beb391cfbe7f83fe294d2224055b2b306b3511fda891d
|
|
BLAKE2b-256 checksum How to use checksums |
4ea1425b78ab4ff38d062d845b2e95e05014ad5c27a3253638d5f88491cee52e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/5.15.146.1-microsoft-standard-WSL2
|
Security for storyweaver 0.1.0
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.