Glyph Forge Documentation

Glyph Forge is a powerful Python client for the Glyph Forge API that enables document generation, schema building, and plaintext processing workflows.

PyPI version Python versions License

Features

  • Schema Building: Build schemas from DOCX templates

  • Schema Running: Generate documents from schemas and plaintext

  • Bulk Processing: Process multiple documents in parallel

  • Schema Compression: Optimize schemas by deduplicating pattern descriptors

  • Plaintext Processing: Intake and normalize plaintext content

  • Workspace Management: Organize inputs, outputs, and artifacts

  • Type Safety: Full type hints for better IDE support

  • Error Handling: Comprehensive exception handling with detailed error messages

Quick Start

Installation

pip install glyph-forge

Basic Usage

from glyph_forge import ForgeClient, create_workspace

# Initialize client and workspace
client = ForgeClient(api_key="your_api_key")
ws = create_workspace()

# Build schema from DOCX
schema = client.build_schema_from_docx(
    ws,
    docx_path="template.docx",
    save_as="my_schema"
)

# Run schema with plaintext
output_path = client.run_schema(
    ws,
    schema=schema,
    plaintext="Your content here...",
    dest_name="output.docx"
)

print(f"Generated document: {output_path}")

Table of Contents

Additional Resources

Indices and Tables