How to use a .env file to hide an API key

preview_player
Показать описание
How to use a .env file to hide an API key with Python and Linux

- conda install -c conda-forge python-dotenv
- create '.env' and add : api = "abcdef"
---
from dotenv import load_dotenv
load_dotenv()
import os
print(token)

Visit redandgreen blog for more Tutorials
=========================================

Subscribe to the YouTube Channel
=================================

Follow on Twitter - to get notified of new videos
=================================================

👍 Become a patron 👍

Buy Dr Pi a coffee (or Tea)

Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?

You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! 👍

◼️ Coupon Code: DRPI10
(You can also get started with 1000 free API calls. No credit card required.)

Thumbs up yeah? (cos Algos..)

#webscraping #tutorials #python
Рекомендации по теме
Комментарии
Автор

how can I extract the .env file to get it on git?

mahmoudalbakri