Comparison
filelock vs flufl.lock vs portalocker vs zc.lockfile
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
A platform independent file lock.
Actively maintained. Last release 5 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install filelockNFS-safe file locking with timeouts for POSIX and Windows
Actively maintained. Last release 7 weeks ago. A safe choice.
pip install flufl-lockCross-platform file locking, with Redis, PID-file and bounded-semaphore locks
Actively maintained. Last release 5 weeks ago, commits in 14 of the last 26 weeks. A safe choice.
pip install portalockerBasic inter-process locks
Maintained. Last release 4 weeks ago, commits in 2 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install zc-lockfileIn short
- filelock is the most used: 638.8M downloads a month, 13× more than portalocker.
- Maintenance is comparable: portalocker 85, filelock 80, flufl.lock 77, zc.lockfile 58 on Pythie’s Index.
- filelock is growing fastest: downloads +12% over the last month.
- Safe default for a new project: filelock.
Side by side
| Metric | filelock | flufl.lock | portalocker | zc.lockfile |
|---|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 80 | Pythie’s Index: 77 | Pythie’s Index: 85 | Pythie’s Index: 58 |
| Verdict | Actively maintained | Actively maintained | Actively maintained | Maintained |
| Downloads / month | 638.8M | 2.4M | 47.8M | 2.6M |
| Downloads, month over month | +12% | -10% | +5% | +6% |
| GitHub stars | 991 | – | 331 | 21 |
| Stars, last 7 days | – | – | – | – |
| Direct dependents | 0 | 19 | 290 | 23 |
| Last release | Nov 27, 2026 | Oct 12, 2026 | Oct 28, 2026 | Nov 5, 2026 |
| Releases, 12 months | 71 | 3 | 9 | 1 |
| Weeks with commits | 26 / 26 | – | 14 / 26 | 2 / 26 |
| Recent contributors | 5 | – | 4 | 16 |
| First release | Jul 2014 | Nov 2010 | Feb 2011 | Jul 2007 |
| Python versions | 3.11 – 3.15 | – | 3.10 – 3.14 | 3.11 – 3.15 |
| License | MIT | Apache-2.0 | BSD-3-Clause | ZPL-2.1 |
| Known vulnerabilities | None | None | None | None |
Bold marks the best value in each row. Pythie’s Index rates maintenance out of 100: how it works.