flytekit.ExecutionParameters¶
- class flytekit.ExecutionParameters(execution_date, tmp_dir, stats, execution_id, logging, raw_output_prefix, checkpoint=None, decks=None, **kwargs)[source]¶
This is a run-time user-centric context object that is accessible to every @task method. It can be accessed using
flytekit.current_context()
This object provides the following * a statsd handler * a logging handler * the execution ID as an
flytekit.models.core.identifier.WorkflowExecutionIdentifier
object * a working directory for the user to write arbitrary files toPlease do not confuse this object with the
flytekit.FlyteContext
object.- Parameters
execution_date – Date when the execution is running
tmp_dir – temporary directory for the execution
stats – handle to emit stats
execution_id – Identifier for the execution
logging – handle to logging
checkpoint – Checkpoint Handle to the configured checkpoint system
Methods
- get(key)[source]¶
Returns task specific context if present else raise an error. The returned context will match the key
- static new_builder(current=None)[source]¶
- Parameters
current (ExecutionParameters) –
- Return type
Builder
Attributes
- checkpoint¶
- decks¶
A list of decks of the tasks, and it will be rendered to a html at the end of the task execution.
- default_deck¶
- execution_date¶
This is a datetime representing the time at which a workflow was started. This is consistent across all tasks executed in a workflow or sub-workflow.
Note
Do NOT use this execution_date to drive any production logic. It might be useful as a tag for data to help in debugging.
- execution_id¶
This is the identifier of the workflow execution within the underlying engine. It will be consistent across all task executions in a workflow or sub-workflow execution.
Note
Do NOT use this execution_id to drive any production logic. This execution ID should only be used as a tag on output data to link back to the workflow run that created it.
- logging¶
A handle to a useful logging object. TODO: Usage examples
- raw_output_prefix¶
- secrets¶
- stats¶
A handle to a special statsd object that provides usefully tagged stats. TODO: Usage examples and better comments
- working_directory¶
A handle to a special working directory for easily producing temporary files.
TODO: Usage examples TODO: This does not always return a AutoDeletingTempDir