--- id: types-filelock version: "3.2.7" license: Apache-2.0 license license_treatment: permissive maintenance: active --- # types-filelock — Typing stubs for filelock License: permissive · Maintenance: active · Downloads: 506.2K/mo ## 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 above — 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 pip install types-filelock uv add types-filelock poetry add types-filelock ## Installing 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: unspecified - Install friction: low - Maintenance: active - Downloads: 506.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs filelock, mypy filelock typing, static type checking file locking, pep 561 type stubs, filelock type annotations, type-stubs, deprecated [View on SkillFed](https://skillfed.io/packages/types-filelock) · [View on PyPI](https://pypi.org/project/types-filelock/)