PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.81k stars 1.55k forks source link

Block creation by yaml #14609

Closed tmiyamon closed 1 month ago

tmiyamon commented 1 month ago

First check

Describe the current behavior

Currently, Prefect's UI and CLI do not offer functionality to create Blocks from YAML or configuration files. This limitation makes it challenging to manage information efficiently.

Describe the proposed behavior

Add functionality to create Blocks from configuration files in Prefect's UI or CLI.

Example Use

prefect blocks load config.yaml 

The contents of config.yaml

string/test-string:
  value: test-value
sqlalchemy-connector/db-uri:
  connection_info:
    driver: postgresql+asyncpg
    database: test-db
    username: user
    password: password
    host: localhost
    port: "5432"

Additional context

Consider adding an overwrite option when creating or updating Blocks. This feature would be useful during execution.

aaazzam commented 1 month ago

👋 Takuya! Thanks for contributing this.

Either way, I think I'm going to convert this to a discussion for now. We're always happy to revisit some of our design assumptions or publish some conveniences if there's enough community support!