Registry / type-stubs / ob-metaflow-stubs

ob-metaflow-stubs

JSON →
library6.0.12.35pypypiunverified

ob-metaflow-stubs provides type stubs for the Metaflow library, enhancing static analysis and developer experience for Metaflow users. Metaflow is a human-centric framework for building and managing real-life AI and ML systems, originally developed at Netflix and now supported by Outerbounds. It streamlines the entire development lifecycle from rapid prototyping to production deployments, enabling teams to iterate quickly and deliver robust systems efficiently. The library is actively maintained with frequent patch releases, aligning with the core Metaflow project's release cadence.

pip install ob-metaflow-stubs
INSTALL
IMPORT
SIG · OB-METAFLOW-STUBS
O
ob-metaflow-stubs
type-stubspythonv6.0.12.35
Install
1.7s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.0.12.35 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.7s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

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

FlowSpec
from metaflow_stubs import FlowSpec
from metaflow_stubs import FlowSpec

This 'Hello World' example defines a basic Metaflow flow with three steps: `start`, `hello`, and `end`. It demonstrates defining steps with `@step` and connecting them with `self.next()`. Run this script using `python your_flow_name.py run` in your terminal to execute the flow locally.

from metaflow import FlowSpec, step class HelloFlow(FlowSpec): """A simple Metaflow flow to validate installation.""" @step def start(self): print("HelloFlow is starting.") self.message = "Metaflow says: Hi!" self.next(self.hello) @step def hello(self): print(self.message) self.next(self.end) @step def end(self): print("HelloFlow is all done.") if __name__ == "__main__": HelloFlow()
Debug
Known issues
breakingWhile Metaflow prioritizes backward compatibility, minor breaking changes can occur in patch versions, especially those addressing bug fixes or internal architectural improvements. These can impact how stubs align with the runtime library.
fix
Always review the GitHub release notes of the main `metaflow` library (Netflix/metaflow) before upgrading to understand specific breaking changes and migration steps that might affect stub usage.
affects: All versions
gotchaWhen scaling Metaflow flows to remote compute environments (e.g., AWS Batch, Kubernetes), locally `pip install`'d or `conda install`'d third-party dependencies are not automatically available. This can lead to runtime errors even if your local environment with stubs is correct.
fix
Explicitly declare all external Python dependencies using the `@pypi` or `@conda` decorators on your `FlowSpec` class or individual `@step` methods to ensure reproducibility and correct execution in remote environments. For example: `@pypi(packages={'scikit-learn': '1.0.2'})`.
affects: All versions
gotchaMetaflow does not offer native support for Windows operating systems. Users on Windows must utilize the Windows Subsystem for Linux (WSL) to install and run Metaflow and its stubs, as it relies on a *nix-like environment.
fix
Install and configure Windows Subsystem for Linux (WSL) and then install Metaflow (and its stubs) within the WSL environment.
affects: All versions
gotchaUsing mutable default arguments in `@step` method signatures (e.g., `items=[]`) can lead to unexpected shared state across different task executions, violating Metaflow's reproducibility principles.
fix
Avoid mutable default arguments. Initialize mutable objects (like lists or dictionaries) inside the step method, for example, `items = [] if items is None else items`.
affects: All versions
gotchaFailing to call `self.next()` at the end of a step will terminate the flow execution at that step, preventing subsequent steps from running, even if the logic within the current step completes successfully.
fix
Always ensure that `self.next(next_step_method)` is called at the end of every step (except for the final `end` step) to define the flow's execution graph.
affects: All versions
Upgrade
Version history
6.0.12.35latest on PyPI · released Jun 9, 2026
Audit
Dependencies
metaflowrequiredThis package provides type stubs for the 'metaflow' library; 'metaflow' is required for runtime functionality.
Agent activity
23 hits · last 30 days
node
18
OpenAI (training)
1
Resources
ob-metaflow-stubs — pip install ob-metaflow-stubs · libregistry