Comparison
lockfile vs portalocker vs zc.lockfile
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Platform-independent file locking module
Likely abandoned. No release or commit for years (last release over 11 years ago).
$
pip install lockfileCross-platform file locking, with Redis, PID-file and bounded-semaphore locks
Actively maintained. Last release 5 weeks ago, commits in 13 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
- lockfile looks abandoned: avoid it for new projects.
- portalocker is the most used: 47.2M downloads a month, 3.7× more than lockfile.
- portalocker also has the best Pythie’s Index (85).
- Safe default for a new project: portalocker.
Side by side
| Metric | lockfile | portalocker | zc.lockfile |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 19 | 85 |