I see a lot of code examples with important keys in them or greyed out in screen shots. Newish to Python there had to be a better way and there is… the .env file.
Place a .env file in your project
Add all the key/value pairs of secret/important things – I’ve mainly used it for my Open AI, Azure Open AI etc keys
Load the variables:
And then you can get them as needed