Comparison
asgi-csrf vs fastapi-csrf-protect
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
ASGI middleware for protecting against CSRF attacks
Slowing down. Last release over 2 years ago, little activity since. Fine for existing code; think twice for a new project.
$
pip install asgi-csrfStateless implementation of Cross-Site Request Forgery (XSRF) Protection by using Double Submit Cookie mitigation pattern
Low maintenance activity. Last release 14 months ago. Weaker on commit activity and recent releases.
$
pip install fastapi-csrf-protectIn short
- asgi-csrf is slowing down (last release over 2 years ago): fine for existing code, risky for a new project.
- fastapi-csrf-protect is the most used: 154.8K downloads a month.
- fastapi-csrf-protect also has the best Pythie’s Index (37).
Side by side
| Metric | asgi-csrf | fastapi-csrf-protect |
|---|---|---|
| Pythie’s Index | Pythie’s Index: 15 | 37 |