This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
authoringfw — Authoring Framework
Domain schemas for AI-assisted creative writing applications.
Installation
pip install authoringfw
Quick Start
from authoringfw import StyleProfile, CharacterProfile, WorldContext, get_format
# Style constraints for prompt injection
style = StyleProfile(tone="melancholic", pov="third_limited", tense="past")
constraints = style.to_constraints()
# Character context
alice = CharacterProfile(
name="Alice",
role="protagonist",
personality_traits=["brave", "curious"],
arc="From fear to courage",
)
print(alice.to_context_string())
# World context
world = WorldContext(
title="The Shattered Realms",
genre="fantasy",
world_rules=["Magic costs life force", "Dragons are extinct"],
)
print(world.to_context_string())
# Format profiles (novel, essay, series, scientific)
roman = get_format("roman")
print(roman.style_constraints)
Schemas
StyleProfile— tone, POV, tense, vocabulary, sentence rhythmCharacterProfile— name, role, traits, backstory, arc, relationshipsWorldContext— title, genre, setting, world rules, locations, loreVersionMetadata— immutable content snapshot with hash, semver, LLM metadataPhaseSnapshot— project state at a workflow phase boundary
Format Profiles
Built-in formats: roman, essay, serie, scientific
from authoringfw.formats.base import get_format, WorkflowPhase
novel = get_format("roman")
outline_steps = novel.steps_for_phase(WorkflowPhase.OUTLINE)
Adapter Interfaces
Protocol-based adapters — no inheritance required:
from authoringfw.adapters.interfaces import IStyleAdapter
class MyStyleAdapter:
async def get_profile(self, style_id): ...
async def analyze_text(self, text): ...
def generate_style_constraints(self, profile): ...
async def score_conformity(self, text, profile): ...
adapter = MyStyleAdapter()
assert isinstance(adapter, IStyleAdapter) # True via @runtime_checkable
Metadata
Release files for authoringfw 0.3.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 | |
|---|---|---|---|---|
| authoringfw-0.3.0.tar.gz | 12.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| authoringfw-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.7 kB
Security for authoringfw 0.3.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.