feat: initial import
This commit is contained in:
commit
0f9c0d93d9
22 changed files with 3563 additions and 0 deletions
24
src/constants.py
Normal file
24
src/constants.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from enum import Enum
|
||||
|
||||
|
||||
class Environment(str, Enum):
|
||||
LOCAL = "LOCAL"
|
||||
TESTING = "TESTING"
|
||||
STAGING = "STAGING"
|
||||
PRODUCTION = "PRODUCTION"
|
||||
|
||||
@property
|
||||
def is_debug(self):
|
||||
return self in (self.LOCAL, self.STAGING, self.TESTING)
|
||||
|
||||
@property
|
||||
def is_local(self):
|
||||
return self is Environment.LOCAL
|
||||
|
||||
@property
|
||||
def is_testing(self):
|
||||
return self == self.TESTING
|
||||
|
||||
@property
|
||||
def is_deployed(self) -> bool:
|
||||
return self in (self.STAGING, self.PRODUCTION)
|
||||
Loading…
Add table
Add a link
Reference in a new issue