sienge-ecbiesek-mcp 1.1.0__py3-none-any.whl → 1.1.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of sienge-ecbiesek-mcp might be problematic. Click here for more details.

@@ -10,8 +10,6 @@ writing logs to a file to avoid interfering with MCP communication.
10
10
 
11
11
  import logging
12
12
  import os
13
- import sys
14
- from datetime import datetime
15
13
  from enum import Enum
16
14
  from pathlib import Path
17
15
  from typing import Any, Optional, Dict
@@ -19,6 +17,7 @@ from typing import Any, Optional, Dict
19
17
 
20
18
  class LogLevel(Enum):
21
19
  """Log levels enum"""
20
+
22
21
  TRACE = 5
23
22
  DEBUG = 10
24
23
  INFO = 20
@@ -31,48 +30,47 @@ class SiengeLogger:
31
30
  Professional logging system for Sienge MCP Server
32
31
  Based on ClickUp MCP logging patterns
33
32
  """
34
-
33
+
35
34
  def __init__(self, name: str = "SiengeMCP"):
36
35
  self.name = name
37
36
  self.pid = os.getpid()
38
37
  self.logger = self._setup_logger()
39
-
38
+
40
39
  def _setup_logger(self) -> logging.Logger:
41
40
  """Setup logger with file output only"""
42
41
  logger = logging.getLogger(self.name)
43
42
  logger.setLevel(logging.DEBUG)
44
-
43
+
45
44
  # Prevent duplicate handlers
46
45
  if logger.handlers:
47
46
  return logger
48
-
47
+
49
48
  # Create logs directory if it doesn't exist
50
49
  log_dir = Path(__file__).parent.parent.parent.parent / "logs"
51
50
  log_dir.mkdir(exist_ok=True)
52
-
51
+
53
52
  # Create file handler
54
53
  log_file = log_dir / "sienge-mcp.log"
55
- file_handler = logging.FileHandler(log_file, mode='w', encoding='utf-8')
56
-
54
+ file_handler = logging.FileHandler(log_file, mode="w", encoding="utf-8")
55
+
57
56
  # Create formatter
58
57
  formatter = logging.Formatter(
59
- '[%(asctime)s] [PID:%(process)d] %(levelname)s [%(name)s]: %(message)s',
60
- datefmt='%Y-%m-%dT%H:%M:%S.%fZ'
58
+ "[%(asctime)s] [PID:%(process)d] %(levelname)s [%(name)s]: %(message)s", datefmt="%Y-%m-%dT%H:%M:%S.%fZ"
61
59
  )
62
60
  file_handler.setFormatter(formatter)
63
-
61
+
64
62
  logger.addHandler(file_handler)
65
-
63
+
66
64
  # Log initialization
67
65
  logger.info(f"Logger initialized for {self.name}")
68
-
66
+
69
67
  return logger
70
-
68
+
71
69
  def _format_data(self, data: Any) -> str:
72
70
  """Format data for logging"""
73
71
  if data is None:
74
72
  return ""
75
-
73
+
76
74
  if isinstance(data, dict):
77
75
  if len(data) <= 4 and all(not isinstance(v, (dict, list)) or v is None for v in data.values()):
78
76
  # Simple object with few properties - format inline
@@ -81,49 +79,50 @@ class SiengeLogger:
81
79
  else:
82
80
  # Complex object - format as JSON
83
81
  import json
82
+
84
83
  try:
85
84
  return f" | {json.dumps(data, indent=2, ensure_ascii=False)}"
86
85
  except (TypeError, ValueError):
87
86
  return f" | {str(data)}"
88
-
87
+
89
88
  return f" | {str(data)}"
90
-
89
+
91
90
  def trace(self, message: str, data: Optional[Dict[str, Any]] = None):
92
91
  """Log trace level message"""
93
92
  log_message = message + (self._format_data(data) if data else "")
94
93
  self.logger.log(LogLevel.TRACE.value, log_message)
95
-
94
+
96
95
  def debug(self, message: str, data: Optional[Dict[str, Any]] = None):
97
96
  """Log debug level message"""
98
97
  log_message = message + (self._format_data(data) if data else "")
99
98
  self.logger.debug(log_message)
100
-
99
+
101
100
  def info(self, message: str, data: Optional[Dict[str, Any]] = None):
102
101
  """Log info level message"""
103
102
  log_message = message + (self._format_data(data) if data else "")
104
103
  self.logger.info(log_message)
105
-
104
+
106
105
  def warn(self, message: str, data: Optional[Dict[str, Any]] = None):
107
106
  """Log warning level message"""
108
107
  log_message = message + (self._format_data(data) if data else "")
109
108
  self.logger.warning(log_message)
110
-
109
+
111
110
  def error(self, message: str, data: Optional[Dict[str, Any]] = None):
112
111
  """Log error level message"""
113
112
  log_message = message + (self._format_data(data) if data else "")
114
113
  self.logger.error(log_message)
115
-
114
+
116
115
  def log_operation(self, operation: str, data: Optional[Dict[str, Any]] = None):
117
116
  """Log API operation with data"""
118
117
  self.debug(f"Operation: {operation}", data)
119
-
118
+
120
119
  def log_request(self, method: str, url: str, data: Optional[Dict[str, Any]] = None):
121
120
  """Log HTTP request"""
122
121
  request_data = {"method": method, "url": url}
123
122
  if data:
124
123
  request_data["data"] = data
125
124
  self.debug("HTTP Request", request_data)
126
-
125
+
127
126
  def log_response(self, status_code: int, url: str, data: Optional[Dict[str, Any]] = None):
128
127
  """Log HTTP response"""
129
128
  response_data = {"status": status_code, "url": url}
@@ -1,34 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: sienge-ecbiesek-mcp
3
- Version: 1.1.0
4
- Summary: Sienge ECBIESEK MCP Server - Model Context Protocol integration for Sienge API (ECBIESEK Company)
5
- Author-email: ECBIESEK <ti@ecbiesek.com>
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/Moizas951/Sienge-mcp
8
- Project-URL: Documentation, https://github.com/Moizas951/Sienge-mcp#readme
9
- Project-URL: Repository, https://github.com/Moizas951/Sienge-mcp.git
10
- Project-URL: Issues, https://github.com/Moizas951/Sienge-mcp/issues
11
- Keywords: sienge,mcp,claude,api,construction,ecbiesek
12
- Classifier: Development Status :: 4 - Beta
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.9
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.12
21
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
- Classifier: Topic :: Office/Business :: Financial
23
- Requires-Python: >=3.9
24
- Description-Content-Type: text/markdown
25
- License-File: LICENSE
26
- Requires-Dist: fastmcp>=0.1.0
27
- Requires-Dist: httpx>=0.25.0
28
- Requires-Dist: pydantic>=2.0.0
29
- Requires-Dist: python-dotenv>=1.0.0
30
- Provides-Extra: dev
31
- Requires-Dist: pytest>=7.0.0; extra == "dev"
32
- Requires-Dist: black>=23.0.0; extra == "dev"
33
- Requires-Dist: flake8>=6.0.0; extra == "dev"
34
- Dynamic: license-file
@@ -1,9 +0,0 @@
1
- sienge_ecbiesek_mcp-1.1.0.dist-info/licenses/LICENSE,sha256=leWD46QLXsQ43M8fE_KgOo5Sf0YB9_X8EVqGdV0Dsc0,1101
2
- sienge_mcp/__init__.py,sha256=Pjl4hgBCWhVJ_BBZXaP7SuZfH7Z1JWZbSs8MV5sUle8,287
3
- sienge_mcp/server.py,sha256=-xMDp97XliIgJMii4X5Ws7gcHAT9Fwe3S2JViCd0tDs,43690
4
- sienge_mcp/utils/logger.py,sha256=bqU0GDsQXE9TaKOq5_6S2L8bh_Nas-EuYNDE3fzlPWg,5880
5
- sienge_ecbiesek_mcp-1.1.0.dist-info/METADATA,sha256=ayq0Ym2v-7Wik1FUnVvqflTNtz9TrccINRhAVPDpFT0,1534
6
- sienge_ecbiesek_mcp-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- sienge_ecbiesek_mcp-1.1.0.dist-info/entry_points.txt,sha256=jxEu6gvTw3ci0mjDfqbi0rBLRpeuscwwRk9-H-UOnO8,63
8
- sienge_ecbiesek_mcp-1.1.0.dist-info/top_level.txt,sha256=FCvuhB9JQPKGY0Q8aKoVc7akqG5htoJyfj-eJvVUmWM,11
9
- sienge_ecbiesek_mcp-1.1.0.dist-info/RECORD,,