File size: 497 Bytes
202fdfa
8f68280
 
 
 
 
 
 
 
 
 
 
 
 
 
7667e4b
8f68280
7667e4b
8f68280
 
202fdfa
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os


class Endpoint:
    def __init__(self):
        self._url = None
    
    @property
    def url(self):
        if self._url is None:
            self._url = self.get_url()
        
        return self._url
    
    def get_url(self):
        endpoint = os.environ.get("endpoint")

        return endpoint 


def get_token():
    token = os.environ.get("auth_token")

    if token is None:
        raise ValueError("auth-token not found in environment variables")
    
    return token