tinybird 0.0.1.dev162__py3-none-any.whl → 0.0.1.dev164__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/modules/cli.py +17 -1
- tinybird/tb/modules/datafile/common.py +0 -1
- tinybird/tb/modules/local_common.py +1 -0
- tinybird/tb/modules/workspace.py +13 -5
- {tinybird-0.0.1.dev162.dist-info → tinybird-0.0.1.dev164.dist-info}/METADATA +1 -1
- {tinybird-0.0.1.dev162.dist-info → tinybird-0.0.1.dev164.dist-info}/RECORD +10 -10
- {tinybird-0.0.1.dev162.dist-info → tinybird-0.0.1.dev164.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev162.dist-info → tinybird-0.0.1.dev164.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev162.dist-info → tinybird-0.0.1.dev164.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/forward/commands'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev164'
|
|
8
|
+
__revision__ = 'f0254a2'
|
tinybird/tb/modules/cli.py
CHANGED
|
@@ -317,7 +317,23 @@ def __unpatch_click_output():
|
|
|
317
317
|
|
|
318
318
|
|
|
319
319
|
async def create_ctx_client(ctx: Context, config: Dict[str, Any], cloud: bool, staging: bool):
|
|
320
|
-
commands_without_ctx_client = [
|
|
320
|
+
commands_without_ctx_client = [
|
|
321
|
+
"auth",
|
|
322
|
+
"check",
|
|
323
|
+
"local",
|
|
324
|
+
"login",
|
|
325
|
+
"logout",
|
|
326
|
+
"update",
|
|
327
|
+
"upgrade",
|
|
328
|
+
"create",
|
|
329
|
+
"info",
|
|
330
|
+
"tag",
|
|
331
|
+
"push",
|
|
332
|
+
"branch",
|
|
333
|
+
"diff",
|
|
334
|
+
"fmt",
|
|
335
|
+
"init",
|
|
336
|
+
]
|
|
321
337
|
command = ctx.invoked_subcommand
|
|
322
338
|
if command in commands_without_ctx_client:
|
|
323
339
|
return None
|
|
@@ -18,6 +18,7 @@ TB_CONTAINER_NAME = "tinybird-local"
|
|
|
18
18
|
TB_LOCAL_PORT = int(os.getenv("TB_LOCAL_PORT", 7181))
|
|
19
19
|
TB_LOCAL_HOST = re.sub(r"^https?://", "", os.getenv("TB_LOCAL_HOST", "localhost"))
|
|
20
20
|
TB_LOCAL_ADDRESS = f"http://{TB_LOCAL_HOST}:{TB_LOCAL_PORT}"
|
|
21
|
+
TB_LOCAL_DEFAULT_WORKSPACE_NAME = "Tinybird_Local_Testing"
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
async def get_tinybird_local_client(
|
tinybird/tb/modules/workspace.py
CHANGED
|
@@ -29,6 +29,7 @@ from tinybird.tb.modules.exceptions import CLIWorkspaceException
|
|
|
29
29
|
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
30
30
|
from tinybird.tb.modules.local_common import (
|
|
31
31
|
TB_LOCAL_ADDRESS,
|
|
32
|
+
TB_LOCAL_DEFAULT_WORKSPACE_NAME,
|
|
32
33
|
get_local_tokens,
|
|
33
34
|
)
|
|
34
35
|
|
|
@@ -183,7 +184,6 @@ async def create_workspace(
|
|
|
183
184
|
|
|
184
185
|
@workspace.command(name="delete", short_help="Delete a workspace for your Tinybird user")
|
|
185
186
|
@click.argument("workspace_name_or_id")
|
|
186
|
-
@click.option("--user_token", is_flag=False, default=None, help="When passed, tb won't prompt asking for the token")
|
|
187
187
|
@click.option(
|
|
188
188
|
"--confirm_hard_delete",
|
|
189
189
|
default=None,
|
|
@@ -194,14 +194,17 @@ async def create_workspace(
|
|
|
194
194
|
@click.pass_context
|
|
195
195
|
@coro
|
|
196
196
|
async def delete_workspace(
|
|
197
|
-
ctx: Context, workspace_name_or_id: str,
|
|
197
|
+
ctx: Context, workspace_name_or_id: str, confirm_hard_delete: Optional[str], yes: bool
|
|
198
198
|
) -> None:
|
|
199
199
|
"""Delete a workspace where you are an admin."""
|
|
200
200
|
|
|
201
|
+
is_cloud = ctx.ensure_object(dict)["env"] == "cloud"
|
|
201
202
|
config = CLIConfig.get_project_config()
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
if is_cloud:
|
|
204
|
+
user_token = await get_user_token(config)
|
|
205
|
+
else:
|
|
206
|
+
user_token = get_local_tokens()["user_token"]
|
|
207
|
+
client: TinyB = ctx.ensure_object(dict)["client"]
|
|
205
208
|
|
|
206
209
|
workspaces = (await client.user_workspaces(version="v1")).get("workspaces", [])
|
|
207
210
|
workspace_to_delete = next(
|
|
@@ -216,6 +219,11 @@ async def delete_workspace(
|
|
|
216
219
|
if not workspace_to_delete:
|
|
217
220
|
raise CLIWorkspaceException(FeedbackManager.error_workspace(workspace=workspace_name_or_id))
|
|
218
221
|
|
|
222
|
+
if workspace_to_delete.get("name") == TB_LOCAL_DEFAULT_WORKSPACE_NAME:
|
|
223
|
+
raise CLIWorkspaceException(
|
|
224
|
+
FeedbackManager.error(message="You cannot delete your default Tinybird Local workspace.")
|
|
225
|
+
)
|
|
226
|
+
|
|
219
227
|
if yes or click.confirm(
|
|
220
228
|
FeedbackManager.warning_confirm_delete_workspace(workspace_name=workspace_to_delete.get("name"))
|
|
221
229
|
):
|
|
@@ -12,14 +12,14 @@ 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=O-Wk9nI9oyyoOis11BRj4KWouMVh94nGgz6nbEPcnaw,247
|
|
16
16
|
tinybird/tb/check_pypi.py,sha256=rW4QmDRbtgKdUUwJCnBkVjmTjZSZGN-XgZhx7vMkC0w,1009
|
|
17
17
|
tinybird/tb/cli.py,sha256=u3eGOhX0MHkuT6tiwaZ0_3twqLmqKXDAOxF7yV_Nn9Q,1075
|
|
18
18
|
tinybird/tb/client.py,sha256=CSBl_JRuioPyY0H8Ac96dJ9wQXDXfrvK2lwqlOxKGoY,55715
|
|
19
19
|
tinybird/tb/config.py,sha256=jT9xndpeCY_g0HdB5qE2EquC0TFRRnkPnQFWZWd04jo,3998
|
|
20
20
|
tinybird/tb/modules/build.py,sha256=zakH5812Lop-XHjGmDRdOPeofPtoeyb_2un_T6e50xw,19177
|
|
21
21
|
tinybird/tb/modules/cicd.py,sha256=MnShTTJzKBYeajswF2jg7p7ZzupaeCgSriAN05MeEdg,7330
|
|
22
|
-
tinybird/tb/modules/cli.py,sha256=
|
|
22
|
+
tinybird/tb/modules/cli.py,sha256=vADGfvo8lOp9-VIYD_d3KVIlcYfQk0ciJawthn-LFaw,14449
|
|
23
23
|
tinybird/tb/modules/common.py,sha256=_mNLBzC7zkveYXgJ02aMJ9L3LrxsAELx84GwEYdWNa0,82955
|
|
24
24
|
tinybird/tb/modules/config.py,sha256=ziqW_t_mRVvWOd85VoB4vKyvgMkEfpXDf9H4v38p2xc,11422
|
|
25
25
|
tinybird/tb/modules/connection.py,sha256=7oOR7x4PhBcm1ETFFCH2YJ_3oeGXjAbmx1cnZX9_L70,9014
|
|
@@ -38,7 +38,7 @@ tinybird/tb/modules/job.py,sha256=n4dSSBgnA8NqD7srGahf2xRj6wxkmX9Vl0J-QJ_a2w0,29
|
|
|
38
38
|
tinybird/tb/modules/llm.py,sha256=KfsCYmKeW1VQz0iDZhGKCRkQv_Y3kTHh6JuxvofOguE,1076
|
|
39
39
|
tinybird/tb/modules/llm_utils.py,sha256=nS9r4FAElJw8yXtmdYrx-rtI2zXR8qXfi1QqUDCfxvg,3469
|
|
40
40
|
tinybird/tb/modules/local.py,sha256=SUaGWH9TLDFFF9uCw4y7UW4NsKgnXG8uxTcxz1dbkCM,14230
|
|
41
|
-
tinybird/tb/modules/local_common.py,sha256=
|
|
41
|
+
tinybird/tb/modules/local_common.py,sha256=9KP8ZrDhFHxTgXoqTnF348D0uof9JugjC-RIN2d9Mh8,4896
|
|
42
42
|
tinybird/tb/modules/login.py,sha256=fmXPSdvJnKPv03chptGuu3_Fm6LhP6kUsUKhrmT8rJc,8269
|
|
43
43
|
tinybird/tb/modules/logout.py,sha256=ULooy1cDBD02-r7voZmhV7udA0ML5tVuflJyShrh56Y,1022
|
|
44
44
|
tinybird/tb/modules/materialization.py,sha256=QJX5kCPhhm6IXBO1JsalVfbQdypCe_eOUDZ_WHJZWS8,5478
|
|
@@ -54,13 +54,13 @@ tinybird/tb/modules/telemetry.py,sha256=X0p5AVkM8BNsK_Rhdcg4p2eIf6OHimHO_VLldBqH
|
|
|
54
54
|
tinybird/tb/modules/test.py,sha256=Yopg89cRwOQpgRzsb9nvu2Z-UR2as2vBjVa5PF3uiK0,13420
|
|
55
55
|
tinybird/tb/modules/token.py,sha256=2fmKwu10_M0pqs6YmJVeILR9ZQB0ejRAET86agASbKM,13488
|
|
56
56
|
tinybird/tb/modules/watch.py,sha256=H1FieLTVGRqmZ0hR0vELbQJ9l0CThrFCgGCta-MPuAY,8883
|
|
57
|
-
tinybird/tb/modules/workspace.py,sha256
|
|
57
|
+
tinybird/tb/modules/workspace.py,sha256=-XUvL2PB5GcviJ8m30h-ZDc5kwJcm1wy1dreYa2l4Ck,10658
|
|
58
58
|
tinybird/tb/modules/workspace_members.py,sha256=RYLpyPM1ECCasHRg3uvpckzXplX0_KgNFsSPZn_i6qk,8744
|
|
59
59
|
tinybird/tb/modules/datafile/build.py,sha256=d_h3pRFDPFrDKGhpFx2iejY25GuB2k8yfNouj6s8caw,50973
|
|
60
60
|
tinybird/tb/modules/datafile/build_common.py,sha256=LU24kAQmxDJIyoIapDaYG-SU3P4FrMG9UBf8m9PgVSI,4565
|
|
61
61
|
tinybird/tb/modules/datafile/build_datasource.py,sha256=nXEQ0qHdq2ai7jJTv8H2d7eeDPBYzLn8VY7zMtOYb8M,17382
|
|
62
62
|
tinybird/tb/modules/datafile/build_pipe.py,sha256=6Cwjf3BKEF3-oQ9PipsQfK-Z43nSwtA4qJAUoysI7Uc,11385
|
|
63
|
-
tinybird/tb/modules/datafile/common.py,sha256=
|
|
63
|
+
tinybird/tb/modules/datafile/common.py,sha256=WOHlXXPLs1RkdPLXA7qLHOGGey7d1Kn8PPdOe-3zVtE,89720
|
|
64
64
|
tinybird/tb/modules/datafile/diff.py,sha256=MTmj53RYjER4neLgWVjabn-FKVFgh8h8uYiBo55lFQg,6757
|
|
65
65
|
tinybird/tb/modules/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1wnI,556
|
|
66
66
|
tinybird/tb/modules/datafile/fixture.py,sha256=DrRWivcvo_1rn7LlVUnHcXccdgx9yVj63mzBkUwCzk8,1420
|
|
@@ -80,8 +80,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
|
|
|
80
80
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
81
81
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
82
82
|
tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
|
|
83
|
-
tinybird-0.0.1.
|
|
84
|
-
tinybird-0.0.1.
|
|
85
|
-
tinybird-0.0.1.
|
|
86
|
-
tinybird-0.0.1.
|
|
87
|
-
tinybird-0.0.1.
|
|
83
|
+
tinybird-0.0.1.dev164.dist-info/METADATA,sha256=q-lifUgG2-tjwbFQ9LlmGX2CybBzR7PWA7dNZA-x_2c,1607
|
|
84
|
+
tinybird-0.0.1.dev164.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
85
|
+
tinybird-0.0.1.dev164.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
86
|
+
tinybird-0.0.1.dev164.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
87
|
+
tinybird-0.0.1.dev164.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|