skillfed

types-filelock

Typing stubs for filelock

types-filelock v3.2.7 506.2K downloads/30d#6,288 on PyPI5,108
Permissive license Apache-2.0 license Active released

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-filelock

uv

uv add types-filelock

poetry

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 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

License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Typing :: Stubs Only

Tags

type stubs filelockmypy filelock typingstatic type checking file lockingpep 561 type stubsfilelock type annotations
type-stubsdeprecated

More Software Development packages