Complete reference for all classes, methods, and parameters — Story Development Toolkit v2.2.2
Release Date: May 7, 2026 | Python: 3.8+
Description: Initial release with core story development features.
| Module | Description |
|---|---|
StoryEngine |
Main story creation and management engine |
Character |
Character creation with traits, goals, skills, fears, relationships |
Plot |
Plot structure with points and subplots |
WorldBuilder |
World building with locations, cultures, rules, factions |
| Generator | Description |
|---|---|
CharacterGenerator |
Random character generation |
PlotGenerator |
Genre-based plot generation (fantasy, mystery, romance, adventure, sci-fi) |
DialogueGenerator |
Template-based dialogue generation |
| Tool | Description |
|---|---|
CoherenceChecker |
Story coherence analysis and plot hole detection |
TextAnalyzer |
Readability and text quality analysis |
from story_toolkit import StoryToolkit
toolkit = StoryToolkit()
story = toolkit.create_story("fantasy", "courage")
hero = toolkit.add_character_to_story(story, "Kai", "protagonist")
hero.add_trait("brave")
Release Date: May 7, 2026 | Python: 3.11+
Description: Added optional LLM integration for advanced dialogue generation.
| Component | Description |
|---|---|
LLMFactory |
Factory for creating LLM backends |
LLMProvider |
Enum: OPENAI, ANTHROPIC, LOCAL, MOCK |
BaseLLMBackend |
Abstract base class for LLM backends |
MockLLMBackend |
Mock backend for testing (no API key) |
use_advanced parameter - Enable LLM for dialoguestyle parameter - natural, dramatic, poetic, humorousnum_lines parameter - Control dialogue lengthget_llm_status() - Check LLM availabilitygenerate_advanced_dialogue() - Direct LLM dialoguehas_llm() / get_llm_info() - LLM info retrievalfrom story_toolkit.llm import LLMFactory, LLMProvider
llm = LLMFactory.create_backend(provider=LLMProvider.MOCK)
toolkit = StoryToolkit(llm_backend=llm)
dialogue = toolkit.dialogue_gen.generate_dialogue(
"Hero", "Villain",
use_advanced=True,
style="dramatic",
num_lines=8
)
Release Date: May 8, 2026 | Python: 3.11+
Description: Added long-term memory with SQLite database backend.
| Component | Description |
|---|---|
MemoryManager |
High-level memory management |
SQLiteMemory |
SQLite backend implementation |
StoryModel |
Story data model |
EventModel |
Event/timeline data model |
CharacterModel |
Character storage model |
add_event() - Add events to story timelineget_timeline() - Retrieve chronological timelinelist_stored_stories() - List all saved storiesload_story_from_memory() - Load saved storysearch_memory() - Search events by keywordtoolkit = StoryToolkit(memory_backend="sqlite", db_path="stories.db")
story = toolkit.create_story("fantasy", "courage", save_to_memory=True)
toolkit.add_event(1, "Hero finds map", "plot", 9)
timeline = toolkit.get_timeline()
Release Date: May 8, 2026 | Python: 3.11+
Description: Multi-format export capabilities.
| Format | Description | Styles |
|---|---|---|
PDF |
Print/Manuscript/Ebook | PRINT, MANUSCRIPT, EBOOK |
EPUB |
eBook format | Amazon, Kobo, Apple Books compatible |
HTML |
Web page | MODERN, CLASSIC, DARK, MINIMAL |
Bionic |
Enhanced readability | Configurable strength (1-3 letters) |
EPUBExporter - Export to eBook formatPDFExporter - Export to PDF with 3 stylesHTMLExporter - Export to HTML with 4 templatesto_bionic() - Convert text to Bionic Reading formatfrom story_toolkit.exporters import PDFExporter, ExportConfig, PDFStyle
config = ExportConfig(title="My Story", author="Me", pdf_style=PDFStyle.PRINT)
exporter = PDFExporter(config)
exporter.export(story, "my_story.pdf")
Release Date: May 8, 2026 | Python: 3.11+
Description: 5 ready-to-use story structures.
| Template | Genre | Stages | Description |
|---|---|---|---|
hero_journey |
Fantasy/Adventure | 12 | Campbell's monomyth |
three_act |
General | 3 | Standard 3-act structure |
mystery_clues |
Mystery | 5 | Detective story structure |
romance_beat |
Romance | 15 | 15-beat romance structure |
horror_cycle |
Horror | 6 | Classic horror structure |
use_template(name, genre, theme) - Create story from templatelist_templates() - List all available templatesget_template_info(name) - Get template detailsstory = toolkit.use_template("hero_journey", genre="fantasy", theme="redemption")
templates = toolkit.list_templates()
for t in templates:
print(t['name'], t['stage_count'])
Release Date: May 8, 2026 | Python: 3.11+
Description: Full command-line interface for easy usage.
| Command | Description | Example |
|---|---|---|
story new |
Create new story | story-toolkit story new --genre fantasy --theme courage |
story list |
List stories in memory | story-toolkit story list |
template list |
List all templates | story-toolkit template list |
template use |
Use a template | story-toolkit template use hero_journey |
story-toolkit story new --genre fantasy --theme courage --output my_story.json
story-toolkit template list
story-toolkit template use hero_journey --output epic.json
from story_toolkit import StoryToolkit
# v1.0.0 style (no extras)
toolkit = StoryToolkit()
# v2.0.0 - With LLM
toolkit = StoryToolkit(llm_backend=llm)
# v2.1.0 - With Memory
toolkit = StoryToolkit(memory_backend="sqlite", db_path="stories.db")
# v2.2.2 - With everything
toolkit = StoryToolkit(llm_backend=llm, memory_backend="sqlite")
| Method | Version | Description |
|---|---|---|
create_story() |
v1.0.0 | Create new story |
add_character_to_story() |
v1.0.0 | Add character to story |
check_story_coherence() |
v1.0.0 | Check story coherence |
generate_full_story() |
v1.0.0 | Generate complete story |
export_story() |
v1.0.0 | Export to JSON/Markdown/TXT |
get_llm_status() |
v2.0.0 | Get LLM backend status |
generate_advanced_dialogue() |
v2.0.0 | Generate with LLM |
add_event() |
v2.1.0 | Add event to timeline |
get_timeline() |
v2.1.0 | Get story timeline |
load_story_from_memory() |
v2.1.0 | Load story from database |
list_stored_stories() |
v2.1.0 | List saved stories |
use_template() |
v2.2.1 | Use pre-built template |
list_templates() |
v2.2.1 | List available templates |
get_template_info() |
v2.2.1 | Get template details |
engine = StoryEngine()
outline = engine.create_story_outline("fantasy", "courage")
engine.add_chapter("The Beginning")
progress = engine.get_story_progress()
hero = Character(name="Elena", age=32, role="protagonist")
hero.add_trait("brave")
hero.add_goal("Save the kingdom")
hero.add_skill("sword_mastery")
hero.add_relationship("Villain", "enemy", strength=9)
hero.advance_arc()
plot = Plot()
point = plot.add_plot_point("Discovery", "Hero finds map", 3, 8)
subplot = plot.add_subplot("Love Story", "Romance subplot", ["Hero", "Heroine"])
timeline = plot.get_plot_timeline()
world = WorldBuilder()
world.create_world("Eldoria", "fantasy")
world.add_location("Crystal City", "Ancient metropolis", "city")
world.add_rule("magical", "Only pure hearts can use magic")
world.add_faction("Shadow Guild", "Secret organization", goals=["control_magic"])
from story_toolkit.generators import CharacterGenerator, PlotGenerator
char_gen = CharacterGenerator()
hero = char_gen.generate_character("protagonist", complexity=4)
plot_gen = PlotGenerator()
plot = plot_gen.generate_plot("mystery", complexity=3)
# v1 style (template-based)
dialogue = toolkit.dialogue_gen.generate_dialogue("Hero", "Villain", context="conflict")
# v2 style (LLM-powered)
dialogue = toolkit.dialogue_gen.generate_dialogue(
"Hero", "Villain",
use_advanced=True,
style="dramatic",
num_lines=10
)
report = toolkit.check_story_coherence(story)
print(f"Score: {report['overall_score']:.0%}")
if report['plot_holes']:
for hole in report['plot_holes']:
print(f"⚠️ {hole}")
from story_toolkit.nlp.text_analyzer import TextAnalyzer
analyzer = TextAnalyzer()
analysis = analyzer.analyze_text("The old house stood on the hill.")
print(analysis["readability_score"])
from story_toolkit.utils.helpers import save_story, load_story, export_to_markdown
save_story(story, "my_story.json")
loaded = load_story("my_story.json")
export_to_markdown(story, "my_story.md")
pip install --upgrade story-toolkit# Core only (v1)
pip install story-toolkit
# With LLM (v2.0.0)
pip install story-toolkit[openai]
pip install story-toolkit[anthropic]
pip install story-toolkit[local]
# With Exporters (v2.2.0)
pip install story-toolkit[export]
# Everything (v2.2.2)
pip install story-toolkit[all]