Repository navigation
Idempotency for Falcon apps (WSGI and ASGI, zero-dependency core) #2711
Replies: 2 comments
|
Hi @violetta98, and thanks for sharing! 👋 Feel free to list it in Complementary Packages on our Wiki, thanks! As to testing it with Falcon, you can easily do it yourself too. An easy way to get us (or at least myself) more involved would be to actually implement Falcon's middleware interface, it should be fairly trivial to do. And ideally add it to your README. Then I promise to test it 🙂 |
|
Closing this as it seems the author has no interest in specifically Falcon, she just spammed the same project in a multitude of repositories and organizations (for visibility I suppose). Some parts of this kit look semantically wrong too, and least in the case of non-idempotent HTTP verbs (such as @violetta98 you are still welcome to add |
Uh oh!
There was an error while loading. Please reload this page.
Hello everyone!
I wrote a small library that makes POST and PATCH handlers safe to retry, sharing in case it's useful here.
It wraps the app rather than using Falcon's middleware interface, so it works on both:
A client retrying with the same
Idempotency-Keygets the first response back and your responder doesn't run again. Two identical requests at once: one runs, the other waits for its result instead of erroring.The easy part is the lookup, which you could do in a Falcon middleware component yourself. The hard part is two requests racing or a worker dying mid-request, and that's most of what this library is.
The core has no third-party dependencies, each backend is an optional extra.
https://github.com/idemkit/idemkit, Apache-2.0
I've only tested it on Starlette, FastAPI and Flask, not Falcon. If you try it and it misbehaves, I'd really like to know. And if you find it useful, a star would help a lot, it's a new project.
All reactions