Skip to main content

Core library for StoryCAD, the outline creation and manipulation tool for fiction writers.

Project description

storycad

Python wrapper around the StoryCAD .NET API (StoryCADLib.Services.API.StoryCADApi). Hosts the CLR in-process via pythonnet and exposes a Pythonic, snake_case surface; errors surface as StoryCADError instead of OperationResult<T> sentinels, and async (Task<T>) methods are joined inline.

The wheel bundles a published build of StoryCADLib under storycad/runtime/, so end users do not need the .NET SDK — only the .NET 10 runtime (the wheel is built with --self-contained false).

Prerequisites

  • Python 3.10+
  • .NET 10 runtime installed on the host (https://dotnet.microsoft.com/download)
  • A wheel matching your platform. Wheels are platform-specific; CI builds: Linux x64, Linux arm64, macOS arm64, Windows x64.

Install

pip install storycadlib-<version>-<platform>.whl

Quick example

from storycad import StoryCAD

sc = StoryCAD()
guids = sc.create_empty_outline("My Story", "Author", "0")
overview = next(e for e in sc.get_all_elements() if e.element_type == "StoryOverview")
hero = sc.add_element(sc.item_type.Character, overview.uuid, "Hero")
sc.write_outline("/tmp/my_story.stbx")

Building from source

git clone https://github.com/storybuilder-org/StoryCAD
cd StoryCAD/bindings/python
./build-wheel.sh   # runs dotnet publish, stages runtime, then python -m build

The script detects your host RID, publishes StoryCADLib for the matching framework-dependent target, and produces a platform wheel under dist/.

Known limitations

  • Async methods are joined synchronously on the calling thread — no real asyncio integration yet.
  • Wheels are platform-specific; you need a wheel built for your OS + arch.
  • StoryCAD is GPL-3.0-or-later. Bundling its DLL into a wheel inherits that license; any project that ships this wheel must comply.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

storycadlib-4.1.0.dev1-cp313-cp313-macosx_26_0_arm64.whl (21.8 MB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

File details

Details for the file storycadlib-4.1.0.dev1-cp313-cp313-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for storycadlib-4.1.0.dev1-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 1f36ac9b37b3cf27c983ef7901abb9fd93d204d337e625786ede0a22fde7ecf9
MD5 7ec3473cb2538f101736a13c2a02dd4c
BLAKE2b-256 be015ccdc3edd1f4f8bb04296d4795668240295e5c6d3c81bf09bc00a6e31a7b

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