fix: load .env file via python-dotenv for local development
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "trytonmcp"
|
name = "tryton_mcp"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Add your description here"
|
description = "Add your description here"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
@@ -7,6 +7,7 @@ requires-python = ">=3.14"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"fastmcp[tasks]>=3.1.0",
|
"fastmcp[tasks]>=3.1.0",
|
||||||
"sabatron-tryton-rpc-client>=7.4.0",
|
"sabatron-tryton-rpc-client>=7.4.0",
|
||||||
|
"python-dotenv>=1.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
import os
|
import os
|
||||||
from contextlib import asynccontextmanager
|
from contextlib import asynccontextmanager
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from dotenv import load_dotenv
|
||||||
from sabatron_tryton_rpc_client.client import Client
|
from sabatron_tryton_rpc_client.client import Client
|
||||||
|
|
||||||
|
project_root = Path(__file__).parent.parent.parent
|
||||||
|
load_dotenv(project_root / ".env")
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class TrytonSettings:
|
class TrytonSettings:
|
||||||
|
|||||||
Reference in New Issue
Block a user