init_config.py was deleted
BOT_open_sesam/pipeline/head This commit looks good
Details
BOT_open_sesam/pipeline/head This commit looks good
Details
parent
65e95b8eb2
commit
93e5303ee6
|
|
@ -1,30 +0,0 @@
|
|||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
|
||||
ENV_FILE = ".env"
|
||||
|
||||
|
||||
def check_env_file():
|
||||
return os.path.exists(ENV_FILE)
|
||||
|
||||
|
||||
def create_env_file():
|
||||
print("Файл .env отсутствует и будет создан автоматически.")
|
||||
|
||||
token = input("Введите TOKEN: ")
|
||||
lock_ip = input("Введите LOCK_IP: ")
|
||||
card_id = input("Введите CARD_ID: ")
|
||||
auth_api = input("Введите AUTH_API: ")
|
||||
|
||||
with open(ENV_FILE, "w") as f:
|
||||
f.write(f"TOKEN={token}\n")
|
||||
f.write(f"LOCK_IP={lock_ip}\n")
|
||||
f.write(f"CARD_ID={card_id}\n")
|
||||
f.write(f"AUTH_API={auth_api}\n")
|
||||
|
||||
print("Файл .env создан. Происходит запуск приложения")
|
||||
|
||||
|
||||
def load_env():
|
||||
load_dotenv()
|
||||
Loading…
Reference in New Issue