apache_beam.transforms.environments module

Environments concepts.

For internal use only. No backwards compatibility guarantees.

class apache_beam.transforms.environments.Environment(capabilities=(), artifacts=(), resource_hints=None)[source]

Bases: object

Abstract base class for environments.

Represents a type and configuration of environment. Each type of Environment should have a unique urn.

For internal use only. No backwards compatibility guarantees.

artifacts()[source]
to_runner_api_parameter(context)[source]
capabilities()[source]
resource_hints()[source]
classmethod register_urn(urn, parameter_type, constructor=None)[source]
classmethod get_env_cls_from_urn(urn)[source]
to_runner_api(context)[source]
classmethod from_runner_api(proto, context)[source]
classmethod from_options(options)[source]

Creates an Environment object from PortableOptions.

Parameters:options – The PortableOptions object.
class apache_beam.transforms.environments.DefaultEnvironment(capabilities=(), artifacts=(), resource_hints=None)[source]

Bases: apache_beam.transforms.environments.Environment

Used as a stub when context is missing a default environment.

to_runner_api_parameter(context)[source]
static from_runner_api_parameter(payload, capabilities, artifacts, resource_hints, context)[source]
class apache_beam.transforms.environments.DockerEnvironment(container_image=None, capabilities=(), artifacts=(), resource_hints=None)[source]

Bases: apache_beam.transforms.environments.Environment

to_runner_api_parameter(context)[source]
static from_runner_api_parameter(payload, capabilities, artifacts, resource_hints, context)[source]
classmethod from_options(options)[source]
classmethod from_container_image(container_image, artifacts=(), resource_hints=None)[source]
static default_docker_image()[source]
class apache_beam.transforms.environments.ProcessEnvironment(command, os='', arch='', env=None, capabilities=(), artifacts=(), resource_hints=None)[source]

Bases: apache_beam.transforms.environments.Environment

to_runner_api_parameter(context)[source]
static from_runner_api_parameter(payload, capabilities, artifacts, resource_hints, context)[source]
static parse_environment_variables(variables)[source]
classmethod from_options(options)[source]
class apache_beam.transforms.environments.ExternalEnvironment(url, params=None, capabilities=(), artifacts=(), resource_hints=None)[source]

Bases: apache_beam.transforms.environments.Environment

to_runner_api_parameter(context)[source]
static from_runner_api_parameter(payload, capabilities, artifacts, resource_hints, context)[source]
classmethod from_options(options)[source]
class apache_beam.transforms.environments.EmbeddedPythonEnvironment(capabilities=(), artifacts=(), resource_hints=None)[source]

Bases: apache_beam.transforms.environments.Environment

to_runner_api_parameter(context)[source]
static from_runner_api_parameter(unused_payload, capabilities, artifacts, resource_hints, context)[source]
classmethod from_options(options)[source]
classmethod default()[source]
class apache_beam.transforms.environments.EmbeddedPythonGrpcEnvironment(state_cache_size=None, data_buffer_time_limit_ms=None, capabilities=(), artifacts=(), resource_hints=None)[source]

Bases: apache_beam.transforms.environments.Environment

to_runner_api_parameter(context)[source]
static from_runner_api_parameter(payload, capabilities, artifacts, resource_hints, context)[source]
classmethod from_options(options)[source]
static parse_config(s)[source]
classmethod default()[source]
class apache_beam.transforms.environments.SubprocessSDKEnvironment(command_string, capabilities=(), artifacts=(), resource_hints=None)[source]

Bases: apache_beam.transforms.environments.Environment

to_runner_api_parameter(context)[source]
static from_runner_api_parameter(payload, capabilities, artifacts, resource_hints, context)[source]
classmethod from_options(options)[source]
classmethod from_command_string(command_string)[source]
class apache_beam.transforms.environments.AnyOfEnvironment(environments)[source]

Bases: apache_beam.transforms.environments.Environment

to_runner_api_parameter(context)[source]
static from_runner_api_parameter(payload, capabilities, artifacts, resource_hints, context)[source]
static create_proto(environments: Iterable[org.apache.beam.model.pipeline.v1.beam_runner_api_pb2.Environment]) → org.apache.beam.model.pipeline.v1.beam_runner_api_pb2.Environment[source]
class apache_beam.transforms.environments.PyPIArtifactRegistry[source]

Bases: object

classmethod register_artifact(name, version)[source]
classmethod get_artifacts()[source]