chore: add python-dotenv for .env loading
This commit is contained in:
parent
1908f5f61d
commit
dfdadc62f0
2 changed files with 3 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ description = "Multi-AI collaborative brainstorming platform"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"python-telegram-bot",
|
"python-telegram-bot",
|
||||||
|
"python-dotenv",
|
||||||
"sqlalchemy",
|
"sqlalchemy",
|
||||||
"httpx",
|
"httpx",
|
||||||
"aiosqlite",
|
"aiosqlite",
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ Usage:
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from dotenv import load_dotenv
|
||||||
from telegram.ext import Application, ApplicationBuilder
|
from telegram.ext import Application, ApplicationBuilder
|
||||||
|
|
||||||
from moai.bot.config import BotConfig
|
from moai.bot.config import BotConfig
|
||||||
|
|
@ -53,6 +54,7 @@ def main() -> None:
|
||||||
"""
|
"""
|
||||||
global _config
|
global _config
|
||||||
|
|
||||||
|
load_dotenv() # Load .env file
|
||||||
_config = BotConfig.from_env()
|
_config = BotConfig.from_env()
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue