Store & manage secrets like API keys in Python - Tech Tip Tuesdays

Store & manage secrets like API keys in Python - Tech Tip Tuesdays

In this video, we explore how to securely manage secrets like API keys, passwords, credential pairs, and other sensitive information in python. We run through the basics of using environment variables and move onto more advanced senarios such as managing different secrets for multiple environments.

For this video we use thew simple python package, Python Dotenv https://pypi.org/project/python-dotenv/ to be able to store our secrets security and use them in our project.

0:00 Introduction

1:05 How not to store secrets

2:15 Environment variables

3:07 Creating environment variables

3:36 Using environment variables in python

5:03 Managing secrets with python dotenv

5:35 using.env file in Python

7:20 Protecting.env file

8:30 Managing multiple env files and environments

8:58 Using dotenv values, managing secrets in a dictionary

10:52 Using filename to change env secrets