docstr: Initialize a Flow level datastore.
  
  This datastore can then be used to get TaskDataStore to store artifacts
  and metadata about a task as well as a ContentAddressedStore to store
  things like packages, etc.
  
  Parameters
  ----------
  flow_name : str
      The name of the flow
  environment : MetaflowEnvironment
      Environment this datastore is operating in
  metadata : MetadataProvider, optional
      The metadata provider to use and update if needed, by default None
  event_logger : EventLogger, optional
      EventLogger to use to report events, by default None
  monitor : Monitor, optional
      Monitor to use to measure/monitor events, by default None
  storage_impl : type
      Class for the backing DataStoreStorage to use; if not provided use
      default_storage_impl, optional
  ds_root : str
      The optional root for this datastore; if not provided, use the
      default for the DataStoreStorage, optional
docstr_tok: ["Initialize","a","Flow","level","datastore",".","This","datastore","can","then","be","used","to","get","TaskDataStore","to","store","artifacts","and","metadata","about","a","task","as","well","as","a","ContentAddressedStore","to","store","things","like","packages",",","etc",".","Parameters","--","--","--","--","--","flow_name",":","str","The","name","of","the","flow","environment",":","MetaflowEnvironment","Environment","this","datastore","is","operating","in","metadata",":","MetadataProvider",",","optional","The","metadata","provider","to","use","and","update","if","needed",",","by","default","None","event_logger",":","EventLogger",",","optional","EventLogger","to","use","to","report","events",",","by","default","None","monitor",":","Monitor",",","optional","Monitor","to","use","to","measure\/monitor","events",",","by","default","None","storage_impl",":","type","Class","for","the","backing","DataStoreStorage","to","use",";","if","not","provided","use","default_storage_impl",",","optional","ds_root",":","str","The","optional","root","for","this","datastore",";","if","not","provided",",","use","the","default","for","the","DataStoreStorage",",","optional"]
code: def __init__(
      self,
      flow_name,
      environment,
      metadata=None,
      event_logger=None,
      monitor=None,
      storage_impl=None,
      ds_root=None,
  ):
      """
      Initialize a Flow level datastore.
  
      This datastore can then be used to get TaskDataStore to store artifacts
      and metadata about a task as well as a ContentAddressedStore to store
      things like packages, etc.
  
      Parameters
      ----------
      flow_name : str
          The name of the flow
      environment : MetaflowEnvironment
          Environment this datastore is operating in
      metadata : MetadataProvider, optional
          The metadata provider to use and update if needed, by default None
      event_logger : EventLogger, optional
          EventLogger to use to report events, by default None
      monitor : Monitor, optional
          Monitor to use to measure/monitor events, by default None
      storage_impl : type
          Class for the backing DataStoreStorage to use; if not provided use
          default_storage_impl, optional
      ds_root : str
          The optional root for this datastore; if not provided, use the
          default for the DataStoreStorage, optional
      """
      storage_impl = (
          storage_impl if storage_impl else self.default_storage_impl
      )
      if storage_impl is None:
          raise RuntimeError(
              "No datastore storage implementation specified"
          )
      self._storage_impl = storage_impl(ds_root)
      self.TYPE = self._storage_impl.TYPE
  
      # Public attributes
      self.flow_name = flow_name
      self.environment = environment
      self.metadata = metadata
      self.logger = event_logger
      self.monitor = monitor
  
      self.ca_store = ContentAddressedStore(
          self._storage_impl.path_join(self.flow_name, "data"),
          self._storage_impl,
      )
  
file_path: metaflow/metaflow/datastore/flow_datastore.py
imports: import itertools
  import json
  from ..None import metaflow_config
  from .content_addressed_store import ContentAddressedStore
  from .task_datastore import TaskDataStore
label_desc: Use image node_id 1 to create a new FlowDataStore object from inherited base classes: object with example: obj = FlowDataStore(flow_name, environment, metadata, event_logger, monitor, storage_impl, ds_root)