.PYI File Extension

Python Stub File

In Python, what does "i" represent in .pyi extension? "i" means interface. A PYI file contains interface definitions for Python code. It is a stub file with empty methods. PYI has same syntax as Pytho...

General Information

Title PYI File Extension
Extension .pyi
Full Form Python Stub File
File Type Stub File
Developer Python Community
MIME Type text/x-python

File Function

Primary Function Type hints
Additional Functions Code analysis, Editor assistance
Features Type annotations, API definitions

File Characteristics

Quality Not applicable
Supports Layers No
Supports Transparency No
Editable Yes

Use Cases

Static Type Checking Yes
Documentation Yes
Development Yes

Security and Practices

Security Risks None inherent
Best Practices Version control, Documentation

Historical/Version Information

Initial Release PEP 484 (2014)
Latest Version PEP 613 (2021)

Associated Types

Similar Extensions .py, .pyc, .pyo, .pyd

Software Compatibility

Software Usage Policy OS Compatibility
Python Free Windows, Mac, Linux, Unix
PyCharm Free, Paid Windows, Mac, Linux
Visual Studio Code Free Windows, Mac, Linux
Mypy Free Windows, Mac, Linux, Unix