Skip to main content

python-kanka

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

Originally inspired by/forked from Kathrin Weihe's python-kanka. Thank you to Kathrin for the foundation and inspiration.

Features

  • 12 Entity Types: Characters, Locations, Organisations, Families, Calendars, Events, Quests, Journals, Notes, Tags, Races, Creatures
  • Type Safety: Built with Pydantic v2 for data validation and type hints
  • Consistent API: Same CRUD interface across all entity types
  • Posts, Assets & Images: Full support for entity sub-resources and automatic image management
  • Search & Filtering: Search across types, filter by name/tags/privacy/dates
  • Rate Limit Handling: Automatic retry with exponential backoff
  • Pagination: Built-in pagination support with metadata

Installation

pip install python-kanka

Quick Start

from kanka import KankaClient

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

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

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

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

# Update and delete
gandalf = client.characters.update(gandalf, title="The White")
client.characters.delete(gandalf)

Documentation

See the full documentation for guides, examples, and complete API reference.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Links

Metadata

Release files for python-kanka 2.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-kanka 2.6.2
File Size Uploaded
python_kanka-2.6.2.tar.gz 182.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-kanka 2.6.2
File Interpreter ABI Platform
python_kanka-2.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 209.6 kB

Release files / python_kanka-2.6.2.tar.gz

Download URL python_kanka-2.6.2.tar.gz
Size 182.7 kB
Tags Source
SHA-256 checksum
How to use checksums
761d2fd7876a34debf1cc71c7d6dc6857c7cde3040e7bb22f3fbde1ab32743e9
BLAKE2b-256 checksum
How to use checksums
8690aa0f4f33a717c50b5a3bd57873491e2f9a46ab4759b46cd3cb6060fbc7c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.

Transparency log

Release files / python_kanka-2.6.2-py3-none-any.whl

Download URL python_kanka-2.6.2-py3-none-any.whl
Size 26.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8854f220a653e93c1ef9971ca20950ee2afdfb16d6a127c6301544a74886e0e
BLAKE2b-256 checksum
How to use checksums
1240261caff0aaa5784adac9855a3befb835f6fabb19f0bd0c031a8520ecb9ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.6.2 This release

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page