added tests
This commit is contained in:
13
src/main.py
13
src/main.py
@@ -10,10 +10,17 @@ import psycopg
|
||||
import asyncio
|
||||
|
||||
ENV = dotenv_values(".env") # .env file
|
||||
VERSION = "v0.0.1" # version number
|
||||
VERSION = "v1.0.0" # version number
|
||||
ALPHABET = string.ascii_uppercase + string.digits #alphabet and numbers for token generation
|
||||
LICENSE_KEY_PARTS = 5 if "NUM_KEY_CHUNKS" not in ENV else ENV["NUM_KEY_CHUNKS"] #number of chunks in the new generated license keys
|
||||
LICENSE_KEY_PART_LENGTH = 5 if "KEY_CHUNK_LENGTH" not in ENV else ENV["KEY_CHUNK_LENGTH"] #number of characters in each chunk
|
||||
try:
|
||||
LICENSE_KEY_PARTS = 5 if "NUM_KEY_CHUNKS" not in ENV else int(ENV["NUM_KEY_CHUNKS"]) #number of chunks in the new generated license keys
|
||||
except:
|
||||
LICENSE_KEY_PARTS = 5
|
||||
|
||||
try:
|
||||
LICENSE_KEY_PART_LENGTH = 5 if "KEY_CHUNK_LENGTH" not in ENV else int(ENV["KEY_CHUNK_LENGTH"]) #number of characters in each chunk
|
||||
except:
|
||||
LICENSE_KEY_PART_LENGTH = 5
|
||||
|
||||
api_key = ""
|
||||
security = HTTPBearer(auto_error=False)
|
||||
|
||||
Reference in New Issue
Block a user