Why are underscores and uppercase letters not allowed in Block names?

I’m curious to hear the reason underscores and uppercase letters are not permitted in Block names. From my understanding the Secret block is intended to be used to store environment variables like API keys. I have seen (and written) a lot of code where env variables are in all-caps and contain underscores so this seems like an odd place for Prefect to be opinionated.

The widely used [dot env (dotenv - npm) package doesn’t allow dashes in env variable names which means you are not able to to use dotenv for local development and then prefect Secret blocks for prod.

1 Like