Skip to content

Commit adeb9fe

Browse files
authored
Merge pull request #6 from tago-io/hotfix/analysisConsole
Fixed analysis console
2 parents 06d1fee + f643e74 commit adeb9fe

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,4 @@ dmypy.json
129129
.pyre/
130130

131131
.DS_Store
132+
*NOTE*

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<img src="https://assets.tago.io/tagoio/sdk.png" width="250px" alt="TagoIO"></img>
44
</p>
55

6+
> NOTE: *This version (4.x.x) is still in development. You can access the current (3.x.x) version in [tago-io/tago-sdk-python](https://github.com/tago-io/tago-sdk-python).*
7+
68
# TagoIO - Python SDK
79

810
Official Python SDK for TagoIO

src/tagoio_sdk/modules/Analysis/Analysis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Callable
44

55
from tagoio_sdk.common.tagoio_module import TagoIOModule
6+
from tagoio_sdk.modules.Services import Services
67

78
T_ANALYSIS_CONTEXT = os.environ.get("T_ANALYSIS_CONTEXT") or None
89

@@ -47,7 +48,7 @@ def context():
4748
def __runLocal(self, environment: any, data: any, analysis_id: any, token: any):
4849
def log(*args: any):
4950
print(*args)
50-
# Services(token).console.log(str(args)[1:][:-2])
51+
Services.Services({"token": token}).console.log(str(args)[1:][:-2])
5152

5253
def context():
5354
pass

src/tagoio_sdk/modules/Services/Console.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ class ConsoleService(TagoIOModule):
1111
:param time: Date of message
1212
"""
1313

14-
def log(self, message: str, time: datetime) -> str:
15-
timestamp = datetime(time)
14+
def log(self, message: str, timestamp: datetime = datetime.now()) -> str:
1615
result = self.doRequest(
1716
{
1817
"path": "/analysis/services/console/send",

0 commit comments

Comments
 (0)