Skip to content

Latest commit

 

History

History
54 lines (28 loc) · 554 Bytes

dev-notes.md

File metadata and controls

54 lines (28 loc) · 554 Bytes

Setting Virtual Environment

Save packages to requirement.txt

pip3 freeze > requirements.txt
#activate venv

python3 -m venv directory-name

cd directory-name/

source bin/activate

pip install -r requirements.txt

#deactivate venv

deactivate

Setting Environment Variables

For Linux Environments

# in virtual environemnts create . env file

touch .env

# Now save your secret

export KEY="mysecretkey_12345"

# Save this file in vevn

source .env
import os

os.environ.get("KEY")