Header files#

Using header files#

A header file in Pyccel is a Python stub file with a name ending with .pyi, which contains function/variable declarations and metavariable declarations. Header files serve two purposes:

  • Link external libraries in the targeted languages by providing their function declarations;

  • Accelerate the parsing process of an imported Python module by parsing only its header file (automatically generated) instead of the full module.

Examples#