@project
The @project decorator makes it convenient to create isolated Metaflow namespaces and
corresponding proudction deployments. When
multiple flows use the same project name, they can fetch data across them safely using the Client API, without interference from other users running the same flows.
By itself, @project doesn't change the behavior besides exposing new attributes in the current object. It alters the flow names when they are deployed in production, allowing multiple parallel deployments.
For more information, see Coordinating Larger Metaflow Projects.
from metaflow import project
Specifies what flows belong to the same project.
A project-specific namespace is created for all flows that
use the same @project(name).
name: str
Project name. Make sure that the name is unique amongst all projects that use the same production scheduler. The name may contain only lowercase alphanumeric characters and underscores.
branch: Optional[str], default None
The branch to use. If not specified, the branch is set to
user.<username> unless production is set to True. This can
also be set on the command line using --branch as a top-level option.
It is an error to specify branch in the decorator and on the command line.
production: bool, default False
Whether or not the branch is the production branch. This can also be set on the
command line using --production as a top-level option. It is an error to specify
production in the decorator and on the command line.
The project branch name will be:
- if
branchis specified:- if
productionis True:prod.<branch> - if
productionis False:test.<branch>
- if
- if
branchis not specified:- if
productionis True:prod - if
productionis False:user.<username>
- if