Created
October 29, 2022 22:06
-
-
Save anna-geller/a5d2ca60a71494ca042aa69bb0d61ead to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from prefect import task, flow | |
from prefect import get_run_logger | |
from typing import Any | |
@task | |
def say_hi(user_name: str, question: str, answer: Any) -> None: | |
logger = get_run_logger() | |
logger.info("Hello from Prefect, %s! 👋", user_name) | |
logger.info("The answer to the %s question is %s! 🤖", question, answer) | |
@flow | |
def parametrized( | |
user: str = "Marvin", question: str = "Ultimate", answer: Any = 42 | |
) -> None: | |
say_hi(user, question, answer) | |
if __name__ == "__main__": | |
parametrized(user="World") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment