Skip to content

python-kanka Documentation

A modern Python client for the Kanka API, the collaborative worldbuilding and campaign management platform.

Guides

Page Description
Getting Started Installation, setup, and your first API call
Core Concepts Client-Manager-Model pattern, entity IDs, immutable models
Entity CRUD Operations Create, read, update, and delete entities
Entity Types Reference All 12 entity types with their specific fields
Posts Attach notes and comments to any entity
Search and Filtering Global search, entities endpoint, list filters
Last Sync Incremental sync using the lastSync/sync mechanism
Pagination Navigate large result sets
Assets and Images File/link/alias assets, entity images, automatic image management
Campaign Gallery Campaign-level image storage
Error Handling Exception types and recommended patterns
Rate Limiting Automatic retry behavior and configuration
Debug Mode Request/response logging for troubleshooting
Known Limitations API quirks and gotchas

Reference

Page Description
API Reference Complete reference for all classes, methods, and models

Quick Example

from kanka import KankaClient

client = KankaClient(token="your-token", campaign_id=12345)

# Create a character
character = client.characters.create(
    name="Gandalf",
    type="Wizard",
    title="The Grey",
)

# Search across all entities
results = client.search("dragon")

# List with filters
npcs = client.characters.list(type="NPC", is_private=False)