Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python use .env

import os
from dotenv import load_dotenv

load_dotenv()

GCP_PROJECT_ID = os.getenv('GCP_PROJECT_ID')
SERVICE_ACCOUNT_FILE = os.getenv('SERVICE_ACCOUNT_FILE')
STORAGE_BUCKET_NAME = os.getenv('STORAGE_BUCKET_NAME')
Comment

python env

#------FOR LINUX/MAC---------#
sudo apt-get install build-essential libssl-dev libffi-dev python-dev #installing requirements
sudo apt-get install -y python3-venv #installing venv 
python3 -m venv env #creating virtual env
source env/bin/activate #activating virtual env


#-------FOR WINDOWS----------# 
py -m pip install --user virtualenv #installing venv
py -m venv env #creating virtual env
.envScriptsactivate #activating virtual env
Comment

python env

python3 -m venv tutorial-env
tutorial-envScriptsactivate.bat (window)
source tutorial-env/bin/activate (linux)
Comment

PREVIOUS NEXT
Code Example
Python :: python 2 is no longer supported 
Python :: string remove everything after character python 
Python :: tkinter entry 
Python :: get columns by type pandas 
Python :: qrcode.make python 
Python :: python send image in post request with json data 
Python :: selenium get parent element 
Python :: python iterate through string in reverse 
Python :: select multiple columns in pandas dataframe 
Python :: list files python 
Python :: remove keys from dict python 
Python :: decision tree algorithm python 
Python :: distance matrix in python 
Python :: element wise subtraction python list 
Python :: change to first letter capital list python 
Python :: ban command in discord.py 
Python :: generate a random letter using python 
Python :: django get settings 
Python :: remove empty space from string python 
Python :: script python to download videio from any website 
Python :: pandas for column in dataframe 
Python :: pandas take first n rows 
Python :: python find the average of a list 
Python :: jupyter notebook for pdf generation 
Python :: how to play video in colab 
Python :: print variable name 
Python :: matplotlib boxplot colors 
Python :: strip all elements in list python 
Python :: discord.py get channel id by channel name 
Python :: python soup 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =