mirror of
https://github.com/latinogino/dolibarr-mcp.git
synced 2026-05-01 05:45:35 +02:00
Update __init__.py to ensure proper module execution
This commit is contained in:
@@ -1,19 +1,26 @@
|
|||||||
"""Professional Dolibarr MCP Server package.
|
"""Dolibarr MCP - Model Context Protocol Server for Dolibarr ERP."""
|
||||||
|
|
||||||
This package provides a comprehensive Model Context Protocol (MCP) server
|
__version__ = "1.0.1"
|
||||||
for Dolibarr ERP integration with full CRUD operations.
|
|
||||||
"""
|
|
||||||
|
|
||||||
__version__ = "1.0.0"
|
|
||||||
__author__ = "Dolibarr MCP Team"
|
__author__ = "Dolibarr MCP Team"
|
||||||
__email__ = "support@dolibarr-mcp.com"
|
|
||||||
|
|
||||||
from .config import Config
|
# Make the main function available at package level
|
||||||
from .dolibarr_client import DolibarrClient, DolibarrAPIError
|
try:
|
||||||
|
from .dolibarr_mcp_server import main
|
||||||
|
except ImportError:
|
||||||
|
# If relative import fails, we might be running directly
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
# Add parent directory to path
|
||||||
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
|
from dolibarr_mcp.dolibarr_mcp_server import main
|
||||||
|
|
||||||
|
# Export main components
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"Config",
|
'main',
|
||||||
"DolibarrClient",
|
'__version__',
|
||||||
"DolibarrAPIError",
|
'__author__'
|
||||||
"__version__"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Support both execution methods
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user