<@ULVA73B9P> When should I use variables over the ...
# marvin-in-the-wild
d
@Marvin When should I use variables over the ‘String’ block
m
You should use variables in Prefect when you need to store and reuse non-sensitive bits of data, such as configuration information. Variables are named, mutable string values and are intended for values with infrequent writes and frequent reads, and their values may be cached for quicker retrieval. Variables can be loaded during flow runtime but can also be used in other contexts at any time, making them suitable for passing configuration information to Prefect configuration files and deployment steps. Do not use variables for sensitive information; for that, you should use Secret blocks instead. For managing variables, you can create, read, edit, and delete them via the Prefect UI, API, and CLI. Details on using variables can be found in the Prefect Variables Documentation. The documentation does not specifically compare variables to "String" blocks, but the general principle is to use variables for dynamic values that you need to access and potentially change across different flows or runs, while static string values can be hardcoded in the flow itself or passed as parameters when needed. For more detailed use cases and guides on how to deploy and use variables effectively, you may refer to the Prefect Deployment Documentation.