Tomas Moreno
07/17/2024, 7:36 PMMarvin
07/17/2024, 7:37 PMTomas Moreno
07/17/2024, 7:37 PMquoteMarvin
07/17/2024, 7:37 PMquote@flowpython
from prefect import flow
@flow(log_prints=True) # this decorator turns the function into a Prefect flow
def my_workflow():
    print("I can call any python code here, including Prefect tasks or flows")
if __name__ == "__main__":
    my_workflow() # call it like a normal python functionTomas Moreno
07/17/2024, 7:38 PMMarvin
07/17/2024, 7:39 PMquoteprefect.utilities.annotationsquotepython
     from prefect.utilities.annotations import quote
     from prefect import flow, task
     @task
     def my_task(param):
         print(param)
     @flow
     def my_flow():
         large_param = "a large string or object"
         my_task(quote(large_param))
     my_flow()quotemapquoteTomas Moreno
07/17/2024, 7:44 PMMarvin
07/17/2024, 7:44 PMquotequotepython
  from prefect.utilities.annotations import quote
  from prefect import task
  @task
  def process_data(df):
      # process the dataframe
      pass
  process_data(quote(large_dataframe))Nate
07/17/2024, 8:33 PMNate
07/17/2024, 8:34 PMquotequoteTomas Moreno
07/18/2024, 7:25 PMTomas Moreno
07/18/2024, 7:25 PM