Registry / devops / metaflow-stubs

metaflow-stubs

JSON →
library2.19.32pypypi✓ verified 84d ago

Metaflow-stubs provides type stubs for the Metaflow package (by Netflix) to enable type checking and IDE autocompletion. Current version 2.19.32, compatible with Python >=3.7. Releases track Metaflow releases, updated frequently.

pip install metaflow-stubs
INSTALL
IMPORT
SIG · METAFLOW-STUBS
M
metaflow-stubs
devopspythonv2.19.32
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FlowSpec
from metaflow import FlowSpec
Import from metaflow, not from metaflow_stubs.
step
from metaflow import step
from metaflow_stubs import step
stubs package should not be imported directly.

Basic Metaflow flow using stubs for type-checking support.

from metaflow import FlowSpec, step, current class MyFlow(FlowSpec): @step def start(self): print("Flow is starting.") self.next(self.end) @step def end(self): print("Flow is done.") if __name__ == '__main__': MyFlow()
Debug
Known issues
gotchaDo not import directly from metaflow_stubs; always import from metaflow. The stubs package only provides type hints via PEP 561, not runtime behavior.
fix
Use 'from metaflow import ...'
affects: all
gotchaThe stubs are installed in site-packages/metaflow_stubs/, but the metaflow package itself may be installed in a separate location. Ensure metaflow is also installed for type checking to work.
fix
Install metaflow: pip install metaflow
affects: all
breakingIf you upgrade metaflow-stubs without upgrading metaflow, type hints may become out-of-sync, leading to false positives from type checkers.
fix
Always upgrade both packages together: pip install -U metaflow metaflow-stubs
affects: >=2.19.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'metaflow_stubs'
Trying to import metaflow_stubs directly.
fix
Do not import metaflow_stubs; install it to enable type hints. The package is a stub package, not meant for runtime imports.
Import 'FlowSpec' could not be resolved (Pylance/reportMissingImports)
metaflow-stubs not installed or not recognized by type checker.
fix
Install metaflow-stubs: pip install metaflow-stubs. Ensure your editor's Python interpreter is set to the environment where it's installed.
TypeError: 'module' object is not callable
Misinterpreting stub module as runtime module; often from importing metaflow_stubs as a module.
fix
Remove any import metaflow_stubs statements. Only import from metaflow.
Upgrade
Version history
2.19.32latest on PyPI · released Jun 3, 2026
Audit
Dependencies
metaflowrequiredRuntime dependency: stubs are used alongside the main metaflow package
Agent activity
2 hits · last 30 days
node
2
Resources
metaflow-stubs — pip install metaflow-stubs · libregistry