types-filelock
Typing stubs for filelock
What it is and what it does
types-filelock is a PEP 561 type stub package that provides type hints for the filelock library. It allows static type checkers like mypy, PyCharm, and pytype to understand and validate code that uses filelock's locking primitives. The package is sourced from typeshed, the community repository of type stubs for the Python standard library and popular third-party packages.
However, this package is largely obsolete for current users: filelock has included its own type annotations since version 3.3.0, making separate type stubs unnecessary. The package has not been updated since June 2022 and exists primarily for users stuck on older filelock versions that predate built-in type support.
Use it for:
- Type-checking legacy code that uses filelock versions older than 3.3.0 when the filelock package itself did not include type stubs.
- Ensuring type safety in projects using older filelock versions before migrating to a newer release with built-in type annotations.
- Providing type information to IDEs and type checkers for filelock when working in environments where filelock cannot be upgraded.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for the filelock package to enable static type checking with mypy, PyCharm, pytype, and similar tools.
No, unless you are locked into filelock < 3.3.0. For any recent filelock version, the package is redundant—filelock itself provides type stubs. The package has not been updated since June 2022, and the description explicitly recommends uninstalling it if you use filelock 3.3.0 or newer. Install only if you have a specific constraint on an older filelock version.
Install
types-filelock on PyPI
pip
pip install types-filelockuv
uv add types-filelockpoetry
poetry add types-filelockInstalling types-filelock
Before you install
Low install friction with no runtime dependencies. However, the package has not been updated since June 2022, and the description notes that filelock has included its own type annotations since version 3.3.0, making this package redundant for recent filelock users.
License in practice
Licensed under Apache-2.0 (permissive), imposing no significant restrictions on use or redistribution.
Quickstart
pip install types-filelock
# Then use with a type checker like mypy on code that imports filelock
import filelock
lock = filelock.FileLock('/tmp/test.lock')
Only useful if you are type-checking code that uses filelock and your version of filelock is older than 3.3.0; newer filelock versions include their own type stubs, making this package unnecessary.
Verify before relying
- Whether the type stubs in this package remain accurate for current filelock versions given the package's last release was June 2022.
- Current compatibility with modern type checkers (mypy, pyright, etc.) and their latest versions.
Package facts
| License | Apache-2.0 license (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 1,527 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 506,179/month — #6,288 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_filelock-3.2.7-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-FlaskProvides PEP 561 type stubs for Flask to enable…
permissive · top 5,000 on PyPI
types-freezegunProvides type stubs for the freezegun…
permissive · top 5,000 on PyPI
types-clickProvides PEP 561 type stubs for the click…
permissive · top 5,000 on PyPI
types-certifiProvides type stubs for the certifi package to…
permissive · top 1,000 on PyPI
types-WerkzeugProvides PEP 561 type stubs for Werkzeug,…
permissive · top 5,000 on PyPI
types-pkg-resourcesProvides type stubs for pkg_resources to enable…
permissive · top 15,000 on PyPI
types-Flask-SQLAlchemyProvides type stubs for Flask-SQLAlchemy to…
permissive · top 15,000 on PyPI
types-backportsProvides PEP 561 type stubs for the backports…
permissive · top 15,000 on PyPI
types-cryptographyProvides PEP 561 type stubs for the…
permissive · top 5,000 on PyPI
types-tornadoProvides PEP 561 type stubs for tornado,…
permissive · top 15,000 on PyPI