---
# System prepended metadata

title: Environment variables in devOps!
tags: [devops]

---

1. `vim ~/.bashrc`
2. Press `i` on your keyboard to enter insert mode in vim.
3. Write `export KEY=VALUE` somewhere in the end, anywhere is fine really
4. Press `esc`(escape key) to enter command mode, now type `:wq` - this will save and quit.
5. Now, in Python, write the following:
```python
import os
key = os.getenv('<KEY_NAME>')
```

6. Now use key as needed