File size: 235 Bytes
c7ca763
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os

from dotenv import load_dotenv


def load_token(token_env):

    load_dotenv()

    token = os.getenv(token_env)

    if token is None:
        raise ValueError("Token não encontrado no arquivo .env")

    return str(token)