idemkit: idempotency for Django views and Celery tasks

Hi all, sharing a library in case it’s useful to anyone here.

idemkit makes an operation safe to retry. It runs your code once per key and replays the first result to duplicates, whether that’s a client retrying a POST, a broker redelivering a message, or a Celery task running twice.

For Django there’s WSGI middleware for the whole app, a DRF mixin for a single view scoped per authenticated user, and a decorator that goes under @app.task for Celery, keyed on the task’s arguments.

Backends are Postgres, Redis, Mongo, DynamoDB, or in-memory for tests. If you already run Postgres there’s a management command for the schema and a reaper for cleanup, so you don’t need to add Redis just for this.

Apache-2.0, works on Python 3.10 to 3.13: GitHub - idemkit/idemkit: Make any operation safe to retry - crash-safe idempotency for HTTP requests, queue messages, and function calls. Redis, Postgres, MongoDB, DynamoDB. · GitHub

It’s new, so if something doesn’t fit how you’d expect it to work in Django, I’d like to hear it.

If you find it useful, I’d appreciate a star. It’s new, so visibility helps a lot right now.