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
- Kanka.io - The Kanka platform
- Kanka API Documentation - Official API docs
- GitHub Repository - Source code
- Issue Tracker - Report bugs or request features
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)
| File | Size | Uploaded | |
|---|---|---|---|
| python_kanka-2.6.2.tar.gz | 182.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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