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