Emma Willemsma
10/08/2020, 8:40 PMfrom prefect import task, Flow
from prefect.environments.storage import Docker
import boto3
@task(log_stdout=True)
def use_boto3():
print('Using boto3 version {}'.format(boto3.__version__))
with Flow('Sample Flow') as flow:
use_boto3()
storage = Docker(python_dependencies=['boto3'])
storage.add_flow(flow)
storage.build()
flow.register(project_name='Dev', build=False)
I would like to be able to run this to register my flow without having to have boto3 installed (since it will only be used during the flow run anyway)Emma Willemsma
10/08/2020, 8:45 PMDylan
Dylan
Emma Willemsma
10/08/2020, 8:49 PMDylan
Dylan
Dylan
@task(log_stdout=True)
def use_boto3():
import boto3
print('Using boto3 version {}'.format(boto3.__version__))
Dylan
Dylan
Dylan
Emma Willemsma
10/08/2020, 8:58 PMDylan
Dylan
Emma Willemsma
10/08/2020, 9:00 PM