Created
January 29, 2023 23:09
-
-
Save anna-geller/386426dca62cc33eea7c2934a9b8e570 to your computer and use it in GitHub Desktop.
This file contains 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