# Operator Tasks
The tasks in this module can be used to represent builtin operations, including math, indexing, and logical comparisons.
In general, users will not instantiate these tasks by hand; they will automatically be applied when users apply inline Python operators to a task and another value.
# GetItem
Helper task that retrieves a specific index of an upstream task's result.
Args:
default (Any)
: the object to use as the default*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.GetItem.run (task_result, key, default=<no default>)[source] |
Args:
|
# GetAttr
Helper task that retrieves a specific attribute of an upstream task's result.
Args:
default (Any)
: the object to use as the default*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.GetAttr.run (task_result, attr, default=<no default>)[source] |
Args:
|
# Add
Evaluates x + y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.Add.run (x, y)[source] |
Args:
|
# Sub
Evaluates x - y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.Sub.run (x, y)[source] |
Args:
|
# Mul
Evaluates x * y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.Mul.run (x, y)[source] |
Args:
|
# Div
Evaluates x / y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.Div.run (x, y)[source] |
Args:
|
# FloorDiv
Evaluates x // y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.FloorDiv.run (x, y)[source] |
Args:
|
# Pow
Evaluates x ** y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.Pow.run (x, y)[source] |
Args:
|
# Mod
Evaluates x % y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.Mod.run (x, y)[source] |
Args:
|
# And
Evaluates x and y.
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.And.run (x, y)[source] |
Args:
|
# Or
Evaluates x or y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.Or.run (x, y)[source] |
Args:
|
# Not
Evaluates not x
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.Not.run (x)[source] |
Args:
|
# Equal
Evaluates x == y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.Equal.run (x, y)[source] |
Args:
|
# NotEqual
Evaluates x != y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.NotEqual.run (x, y)[source] |
Args:
|
# GreaterThanOrEqual
Evaluates x ≥ y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.GreaterThanOrEqual.run (x, y)[source] |
Args:
|
# GreaterThan
Evaluates x > y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.GreaterThan.run (x, y)[source] |
Args:
|
# LessThanOrEqual
Evaluates x ≤ y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.LessThanOrEqual.run (x, y)[source] |
Args:
|
# LessThan
Evaluates x < y
Args:
*args (Any)
: positional arguments for theTask
class**kwargs (Any)
: keyword arguments for theTask
class
methods: |
---|
prefect.tasks.core.operators.LessThan.run (x, y)[source] |
Args:
|
This documentation was auto-generated from commit bd9182e
on July 31, 2024 at 18:02 UTC