Gio
08/15/2023, 9:40 PM15:37:28.148 | INFO | Flow run 'loyal-kingfisher' - Finished in state Completed()
15:37:34.964 | ERROR | GlobalEventLoopThread | prefect._internal.concurrency - Service 'EventsWorker' failed with 3 pending items.
Marvin
08/15/2023, 9:40 PMGio
08/15/2023, 9:43 PMimport httpx
from prefect import flow
from prefect.blocks.system import Secret
secret_block = Secret.load("secret")
@flow()
def get_repo_info():
url = "<https://api.github.com/repos/PrefectHQ/prefect>"
response = httpx.get(url)
response.raise_for_status()
repo = response.json()
print(f"PrefectHQ/prefect repository statistics 🤓:")
print(f"Stars 🌠 : {repo['stargazers_count']}")
print(f"Forks 🍴 : {repo['forks_count']}")
if __name__ == "__main__":
get_repo_info()