tinybird 0.0.1.dev123__py3-none-any.whl → 0.0.1.dev124__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 tinybird might be problematic. Click here for more details.
- tinybird/tb/__cli__.py +2 -2
- tinybird/tb/config.py +4 -0
- tinybird/tb/modules/common.py +1 -1
- tinybird/tb/modules/create.py +2 -1
- tinybird/tb/modules/telemetry.py +17 -2
- {tinybird-0.0.1.dev123.dist-info → tinybird-0.0.1.dev124.dist-info}/METADATA +1 -1
- {tinybird-0.0.1.dev123.dist-info → tinybird-0.0.1.dev124.dist-info}/RECORD +10 -10
- {tinybird-0.0.1.dev123.dist-info → tinybird-0.0.1.dev124.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev123.dist-info → tinybird-0.0.1.dev124.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev123.dist-info → tinybird-0.0.1.dev124.dist-info}/top_level.txt +0 -0
tinybird/tb/__cli__.py
CHANGED
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/cli/introduction.html'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev124'
|
|
8
|
+
__revision__ = '325c83b'
|
tinybird/tb/config.py
CHANGED
|
@@ -65,6 +65,10 @@ async def get_config(
|
|
|
65
65
|
config["host"] = host or config.get("host", DEFAULT_API_HOST)
|
|
66
66
|
config["workspaces"] = config.get("workspaces", [])
|
|
67
67
|
config["cwd"] = config.get("cwd", getcwd())
|
|
68
|
+
config["user_email"] = config.get("user_email", None)
|
|
69
|
+
config["user_id"] = config.get("user_id", None)
|
|
70
|
+
config["workspace_id"] = config.get("id", None)
|
|
71
|
+
config["workspace_name"] = config.get("name", None)
|
|
68
72
|
return config
|
|
69
73
|
|
|
70
74
|
|
tinybird/tb/modules/common.py
CHANGED
|
@@ -243,7 +243,7 @@ class CatchAuthExceptions(AliasedGroup):
|
|
|
243
243
|
formatter.write_heading("Telemetry")
|
|
244
244
|
formatter.write_text(
|
|
245
245
|
"""
|
|
246
|
-
Tinybird collects
|
|
246
|
+
Tinybird collects usage data and errors to improve the command
|
|
247
247
|
line experience. To opt-out, set TB_CLI_TELEMETRY_OPTOUT to '1' or 'true'."""
|
|
248
248
|
)
|
|
249
249
|
formatter.write_paragraph()
|
tinybird/tb/modules/create.py
CHANGED
|
@@ -88,7 +88,8 @@ async def create(
|
|
|
88
88
|
click.echo(FeedbackManager.success(message="✓ Scaffolding completed!\n"))
|
|
89
89
|
created_something = True
|
|
90
90
|
result = ""
|
|
91
|
-
|
|
91
|
+
|
|
92
|
+
if data or (prompt and user_token):
|
|
92
93
|
click.echo(FeedbackManager.highlight(message="\n» Creating resources..."))
|
|
93
94
|
result, created_something = await create_resources(
|
|
94
95
|
local_client, tb_client, user_token, data, prompt, folder
|
tinybird/tb/modules/telemetry.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import functools
|
|
2
|
+
import hashlib
|
|
2
3
|
import json
|
|
3
4
|
import os
|
|
4
5
|
import platform
|
|
@@ -13,7 +14,8 @@ from urllib.parse import urlencode
|
|
|
13
14
|
|
|
14
15
|
import requests
|
|
15
16
|
|
|
16
|
-
from tinybird.
|
|
17
|
+
from tinybird.syncasync import async_to_sync
|
|
18
|
+
from tinybird.tb.config import CURRENT_VERSION, get_config
|
|
17
19
|
|
|
18
20
|
TELEMETRY_TIMEOUT: int = 1
|
|
19
21
|
TELEMETRY_DATASOURCE: str = "tb_cli_telemetry"
|
|
@@ -80,7 +82,11 @@ def _hide_tokens(text: str) -> str:
|
|
|
80
82
|
|
|
81
83
|
|
|
82
84
|
class TelemetryHelper:
|
|
83
|
-
def __init__(
|
|
85
|
+
def __init__(
|
|
86
|
+
self,
|
|
87
|
+
tb_host: Optional[str] = None,
|
|
88
|
+
max_enqueued_events: int = 5,
|
|
89
|
+
) -> None:
|
|
84
90
|
self.tb_host = tb_host or os.getenv("TB_CLI_TELEMETRY_HOST", "https://api.tinybird.co")
|
|
85
91
|
self.max_enqueued_events: int = max_enqueued_events
|
|
86
92
|
|
|
@@ -112,6 +118,15 @@ class TelemetryHelper:
|
|
|
112
118
|
self.log("Not sending events in local development mode")
|
|
113
119
|
return
|
|
114
120
|
|
|
121
|
+
event_data["fingerprint_id"] = hashlib.sha256(platform.node().encode()).hexdigest()
|
|
122
|
+
|
|
123
|
+
config = async_to_sync(get_config)(None, None)
|
|
124
|
+
if config:
|
|
125
|
+
event_data["workspace_id"] = config.get("workspace_id", "")
|
|
126
|
+
event_data["workspace_name"] = config.get("workspace_name", "")
|
|
127
|
+
event_data["user_email"] = config.get("user_email", "")
|
|
128
|
+
event_data["user_id"] = config.get("user_id", "")
|
|
129
|
+
|
|
115
130
|
# Let's save deep copies to not interfere with original objects
|
|
116
131
|
event_dict: Dict[str, Any] = deepcopy(self._defaults)
|
|
117
132
|
event_dict["event"] = event
|
|
@@ -12,19 +12,19 @@ tinybird/syncasync.py,sha256=IPnOx6lMbf9SNddN1eBtssg8vCLHMt76SuZ6YNYm-Yk,27761
|
|
|
12
12
|
tinybird/tornado_template.py,sha256=jjNVDMnkYFWXflmT8KU_Ssbo5vR8KQq3EJMk5vYgXRw,41959
|
|
13
13
|
tinybird/ch_utils/constants.py,sha256=aYvg2C_WxYWsnqPdZB1ZFoIr8ZY-XjUXYyHKE9Ansj0,3890
|
|
14
14
|
tinybird/ch_utils/engine.py,sha256=BZuPM7MFS7vaEKK5tOMR2bwSAgJudPrJt27uVEwZmTY,40512
|
|
15
|
-
tinybird/tb/__cli__.py,sha256=
|
|
15
|
+
tinybird/tb/__cli__.py,sha256=yRgIZndvTr1rfUOaK4rUcrgoA1LsLCDprVp8u7BjOKs,252
|
|
16
16
|
tinybird/tb/cli.py,sha256=uDLwcbwSJfVFw-pceijZJqaq26z5jNsey0QaUGFjt7w,1097
|
|
17
17
|
tinybird/tb/client.py,sha256=oa0pR46WvzDoqpyaDU-lRu33I0cZhtZVDqDQz2RHMWQ,56085
|
|
18
|
-
tinybird/tb/config.py,sha256=
|
|
18
|
+
tinybird/tb/config.py,sha256=iIia7F67UI9p51Ja4jALonyttIi4eH7PwOn3HvcvOb8,4008
|
|
19
19
|
tinybird/tb/modules/auth.py,sha256=_OeYnmTH83lnqCgQEdS6K0bx1KBUeRmZk2M7JnRmWpk,9037
|
|
20
20
|
tinybird/tb/modules/build.py,sha256=9O6SzOSe2kPWFSjvSYlBV17Db14MeVQpHY952knArx0,15932
|
|
21
21
|
tinybird/tb/modules/cicd.py,sha256=A7zJZF9HkJ6NPokplgNjmefMrpUlRbFxBbjMZhq5OTI,7110
|
|
22
22
|
tinybird/tb/modules/cli.py,sha256=Y_5hu9xwyTIZw4bQoe0MYLnRIzmR7hUjql_oZBxd4Qg,13407
|
|
23
|
-
tinybird/tb/modules/common.py,sha256=
|
|
23
|
+
tinybird/tb/modules/common.py,sha256=bdKNjHtQKcsZFyZIsLY8vEoTD0Xf-1UNBnh1pAyWPZU,83456
|
|
24
24
|
tinybird/tb/modules/config.py,sha256=ziqW_t_mRVvWOd85VoB4vKyvgMkEfpXDf9H4v38p2xc,11422
|
|
25
25
|
tinybird/tb/modules/connection.py,sha256=ctrcZCksfBKJHv3pMoDzsmgmx-rlkfeyn2GkxM0Zlw0,6892
|
|
26
26
|
tinybird/tb/modules/copy.py,sha256=2Mm4FWKehOG7CoOhiF1m9UZJgJn0W1_cMolqju8ONYg,5805
|
|
27
|
-
tinybird/tb/modules/create.py,sha256=
|
|
27
|
+
tinybird/tb/modules/create.py,sha256=CGQBcHk6HVUguCEZ_7VHgnfEOkB38kuC0YvzuUufU1k,16577
|
|
28
28
|
tinybird/tb/modules/datasource.py,sha256=-aQCK_-wEmoo92Ki7zr2wm424RchDgWvT6yhfFY5kko,16909
|
|
29
29
|
tinybird/tb/modules/deployment.py,sha256=4Zt7jPbqt18fB5kPx7DbO91Bh6xzBBTEUFY7O89shuU,19560
|
|
30
30
|
tinybird/tb/modules/endpoint.py,sha256=XySDt3pk66vxOZ0egUfz4bY8bEk3BjOXkv-L0OIJ3sc,12083
|
|
@@ -49,7 +49,7 @@ tinybird/tb/modules/secret.py,sha256=rhCRxHKSiUZ4iYY5_EKH57iHzA2mZtjCyuHRsQcA-DY
|
|
|
49
49
|
tinybird/tb/modules/shell.py,sha256=cvT0EKpnSRHfuo3avykBRMsCwLBqmzSR7sNUdbQ6lXA,14116
|
|
50
50
|
tinybird/tb/modules/table.py,sha256=4XrtjM-N0zfNtxVkbvLDQQazno1EPXnxTyo7llivfXk,11035
|
|
51
51
|
tinybird/tb/modules/tag.py,sha256=anPmMUBc-TbFovlpFi8GPkKA18y7Y0GczMsMms5TZsU,3502
|
|
52
|
-
tinybird/tb/modules/telemetry.py,sha256=
|
|
52
|
+
tinybird/tb/modules/telemetry.py,sha256=C-aEXY3yQMHzFFySwefwyigprcmjoz_CiCXv17jpCPA,11001
|
|
53
53
|
tinybird/tb/modules/test.py,sha256=HxkSpdLOW8brGUNsqdBoSW8RixxyC7OCDmYwEZsIpfs,11459
|
|
54
54
|
tinybird/tb/modules/token.py,sha256=2fmKwu10_M0pqs6YmJVeILR9ZQB0ejRAET86agASbKM,13488
|
|
55
55
|
tinybird/tb/modules/watch.py,sha256=poNJOUNDESDNn80H2dHvE6X6pIu-t9MZFi59_TxVN2U,8822
|
|
@@ -79,8 +79,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
|
|
|
79
79
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
80
80
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
81
81
|
tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
|
|
82
|
-
tinybird-0.0.1.
|
|
83
|
-
tinybird-0.0.1.
|
|
84
|
-
tinybird-0.0.1.
|
|
85
|
-
tinybird-0.0.1.
|
|
86
|
-
tinybird-0.0.1.
|
|
82
|
+
tinybird-0.0.1.dev124.dist-info/METADATA,sha256=0B_zlu-C3jSAtHgjGRjlFZks5aVHgZ1I0zlGhMa2BZE,1612
|
|
83
|
+
tinybird-0.0.1.dev124.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
84
|
+
tinybird-0.0.1.dev124.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
85
|
+
tinybird-0.0.1.dev124.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
86
|
+
tinybird-0.0.1.dev124.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|