File tree Expand file tree Collapse file tree
sdks/python/apache_beam/options Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020
2121This module provides thread-safe and async-safe access to PipelineOptions
2222using contextvars.
23-
24- Usage:
25- # Reading options (from anywhere in the call stack):
26- from apache_beam.options.pipeline_construction_options import get_current_pipeline_options
27- options = get_current_pipeline_options()
28-
29- # Setting options (typically done internally by Pipeline):
30- from apache_beam.options.pipeline_construction_options import scoped_pipeline_options
31- with scoped_pipeline_options(options):
32- # All code here sees these options
33- ...
3423"""
3524
3625from contextlib import contextmanager
Original file line number Diff line number Diff line change 2626import unittest
2727
2828import apache_beam as beam
29-
3029from apache_beam .options .pipeline_construction_options import get_current_pipeline_options
3130from apache_beam .options .pipeline_construction_options import scoped_pipeline_options
3231from apache_beam .options .pipeline_options import PipelineOptions
You can’t perform that action at this time.
0 commit comments