Python client for the Kanka API
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_kanka-2.4.0.tar.gz.
File metadata
- Download URL: python_kanka-2.4.0.tar.gz
- Upload date:
- Size: 164.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2808f50435f9dd12b4b4e43b4daf909aa1cbd6c3518cfb62dcb8420d5537002
|
|
| MD5 |
d6f299643ad14c547e279b527e59352d
|
|
| BLAKE2b-256 |
1403e79332ab358153bec637cd71b3874d5e526200edf0e7178aaa34dde71cda
|
Provenance
The following attestation bundles were made for python_kanka-2.4.0.tar.gz:
Publisher:
publish.yml on ervwalter/python-kanka
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_kanka-2.4.0.tar.gz -
Subject digest:
f2808f50435f9dd12b4b4e43b4daf909aa1cbd6c3518cfb62dcb8420d5537002 - Sigstore transparency entry: 977819557
- Sigstore integration time:
-
Permalink:
ervwalter/python-kanka@61bfe76d947d125427bf057ad139b98864a1b1fa -
Branch / Tag:
refs/tags/v2.4.0 - Owner: https://github.com/ervwalter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@61bfe76d947d125427bf057ad139b98864a1b1fa -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_kanka-2.4.0-py3-none-any.whl.
File metadata
- Download URL: python_kanka-2.4.0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63cd0c97800eb612dc34a0804da5a09213e04413529183ec30d5ddbfc07c21bc
|
|
| MD5 |
353e33e5dbc4ad3dbabbcbe6725c7aec
|
|
| BLAKE2b-256 |
46097d809586d3d97020e6c18f7c755ba0628895e4c63f5e571e5af12976033c
|
Provenance
The following attestation bundles were made for python_kanka-2.4.0-py3-none-any.whl:
Publisher:
publish.yml on ervwalter/python-kanka
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_kanka-2.4.0-py3-none-any.whl -
Subject digest:
63cd0c97800eb612dc34a0804da5a09213e04413529183ec30d5ddbfc07c21bc - Sigstore transparency entry: 977819615
- Sigstore integration time:
-
Permalink:
ervwalter/python-kanka@61bfe76d947d125427bf057ad139b98864a1b1fa -
Branch / Tag:
refs/tags/v2.4.0 - Owner: https://github.com/ervwalter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@61bfe76d947d125427bf057ad139b98864a1b1fa -
Trigger Event:
release
-
Statement type: