tg-index icon indicating copy to clipboard operation
tg-index copied to clipboard

Guide for enviorement variables

Open lit34 opened this issue 3 years ago • 4 comments

Can you please tell me how to put those values in a file? What is the syntax? I created a .env file but I get this error: raise KeyError(key) from None KeyError: 'API_ID'

lit34 avatar Mar 06 '21 09:03 lit34

Use these commands to set environment variables

export API_ID=8191919
export API_HASH="8hwhw91j282uw8wj"

And so on...

viper-adnan avatar Jun 09 '21 08:06 viper-adnan

@lit34 if you are talking about repl.it deployment, it doesn't require you to create the .env file yourself anymore, you can set them as keys and values in the secrets tab of the IDE ~

image

pseudokawaii avatar Jun 12 '21 18:06 pseudokawaii

Use these commands to set environment variables

export API_ID=8191919
export API_HASH="8hwhw91j282uw8wj"

And so on...

how can i use .env instead of export the env value?

simonlkch avatar Aug 02 '21 02:08 simonlkch

Use these commands to set environment variables

export API_ID=8191919
export API_HASH="8hwhw91j282uw8wj"

And so on...

how can i use .env instead of export the env value?

I suppose you can use the python_dotenv module and load the .env file , I havent tested it though on repl.it

rayanfer32 avatar Aug 02 '21 04:08 rayanfer32