tinybird 0.0.1.dev209__py3-none-any.whl → 0.0.1.dev210__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 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.dev209'
8
- __revision__ = '07df479'
7
+ __version__ = '0.0.1.dev210'
8
+ __revision__ = 'd56b861'
@@ -248,7 +248,10 @@ class CLIConfig:
248
248
  return self.get_client(self.get_user_token(), host)
249
249
 
250
250
  def get_user_email(self) -> Optional[str]:
251
- return self["user_email"]
251
+ try:
252
+ return self["user_email"]
253
+ except KeyError:
254
+ return None
252
255
 
253
256
  def set_workspace_token(self, workspace_id: str, token: str) -> None:
254
257
  pass
@@ -7,6 +7,7 @@ from tinybird.tb.client import TinyB
7
7
  from tinybird.tb.config import get_display_cloud_host
8
8
  from tinybird.tb.modules.cli import CLIConfig, cli
9
9
  from tinybird.tb.modules.common import coro, echo_json, force_echo, format_robust_table
10
+ from tinybird.tb.modules.exceptions import CLILocalException
10
11
  from tinybird.tb.modules.feedback_manager import FeedbackManager
11
12
  from tinybird.tb.modules.local_common import TB_LOCAL_ADDRESS, get_tinybird_local_config
12
13
  from tinybird.tb.modules.project import Project
@@ -75,18 +76,27 @@ async def get_local_info(config: Dict[str, Any]) -> Tuple[Iterable[Any], List[st
75
76
  user_token = local_config.get_user_token() or "No user token found"
76
77
  api_host = TB_LOCAL_ADDRESS
77
78
  ui_host = get_display_cloud_host(api_host)
78
- return await get_env_info(local_client, config, user_email, token, user_token, api_host, ui_host)
79
- except Exception:
79
+ return await get_env_info(local_client, config, user_email, token, user_token, api_host, ui_host, is_local=True)
80
+ except CLILocalException as e:
81
+ raise e
82
+ except Exception as e:
80
83
  click.echo(
81
84
  FeedbackManager.warning(
82
- message="\n⚠ Could not retrieve Tinybird Local info. Please run `tb local start` first."
85
+ message=f"\n⚠ Tinybird Local is running but could not retrieve the workspace info. Please run `tb login` first or check that you are located in the correct directory. {e}"
83
86
  )
84
87
  )
85
88
  return [], []
86
89
 
87
90
 
88
91
  async def get_env_info(
89
- client: TinyB, config: Dict[str, Any], user_email: str, token: str, user_token: str, api_host: str, ui_host: str
92
+ client: TinyB,
93
+ config: Dict[str, Any],
94
+ user_email: str,
95
+ token: str,
96
+ user_token: str,
97
+ api_host: str,
98
+ ui_host: str,
99
+ is_local=False,
90
100
  ) -> Tuple[List[Any], List[str]]:
91
101
  user_workspaces = await client.user_workspaces(version="v1")
92
102
  current_workspace = await client.workspace_info(version="v1")
@@ -113,6 +123,15 @@ async def get_env_info(
113
123
  (user_email, current_main_workspace["name"], current_main_workspace["id"], token, user_token, api_host, ui_host)
114
124
  ]
115
125
 
126
+ if is_local and (
127
+ "Tinybird_Local_Build_" in current_main_workspace["name"]
128
+ or "Tinybird_Local_Testing" in current_main_workspace["name"]
129
+ ):
130
+ click.echo(
131
+ FeedbackManager.warning(
132
+ message="\n⚠ Tinybird Local is running but you are logged locally in a temporal workspace until you run `tb login` or check that you are located in the correct directory."
133
+ )
134
+ )
116
135
  click.echo(format_robust_table(table, column_names=columns))
117
136
  return table, columns
118
137
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev209
3
+ Version: 0.0.1.dev210
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
6
6
  Author: Tinybird
@@ -12,7 +12,7 @@ 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=X4tE9OrfaUy6kO9cqVEzyI9cDcmOF3IAssRRzsTsfEQ,40781
15
- tinybird/tb/__cli__.py,sha256=O7g3yopfrDu7y0_6SzcKTo4TYeGkn1Plvf1eLe40iqU,247
15
+ tinybird/tb/__cli__.py,sha256=1cwlex24JRhH9FGFepOdSnSGpEXzXtXArCkp1M8V9mA,247
16
16
  tinybird/tb/check_pypi.py,sha256=i3l2L8IajeB7sreikR7oPlYJki9MtS3c_M4crnmbByc,760
17
17
  tinybird/tb/cli.py,sha256=u3eGOhX0MHkuT6tiwaZ0_3twqLmqKXDAOxF7yV_Nn9Q,1075
18
18
  tinybird/tb/client.py,sha256=0zUAi9Lclo2JusQKlQnSnSP1XCiCK9I03XtLqmk8e04,56487
@@ -21,7 +21,7 @@ tinybird/tb/modules/build.py,sha256=UQDuFxFNH6RvBhubCoKBEJ3_s07mK9W7hso2pIcLLEM,
21
21
  tinybird/tb/modules/cicd.py,sha256=Njb6eZOHHbUkoJJx6KoixO9PsfA_T-3Ybkya9-50Ca8,7328
22
22
  tinybird/tb/modules/cli.py,sha256=k6Bp-lWC-ruMMB47lxwsinLQt4qJL_n84hjyxi9JYt4,15676
23
23
  tinybird/tb/modules/common.py,sha256=R675BLZTnPlCoPphCTcy3S1lsf1MF_H3U_ox9yPNCqg,84187
24
- tinybird/tb/modules/config.py,sha256=ziqW_t_mRVvWOd85VoB4vKyvgMkEfpXDf9H4v38p2xc,11422
24
+ tinybird/tb/modules/config.py,sha256=VnzYVUo4q1RBEEMMce4_OCrKp4erhgkRPHElydVlKj0,11488
25
25
  tinybird/tb/modules/connection.py,sha256=FJZHTAR6sf5VbPIotxbyMgO-6UCCbnsKj6I0EjeCa-g,17791
26
26
  tinybird/tb/modules/copy.py,sha256=2Mm4FWKehOG7CoOhiF1m9UZJgJn0W1_cMolqju8ONYg,5805
27
27
  tinybird/tb/modules/create.py,sha256=sncG6iaeS_AApY1EmmfYEdj9B6-1CPZJzvTmfJQj_Rc,22112
@@ -32,7 +32,7 @@ tinybird/tb/modules/dev_server.py,sha256=57FCKuWpErwYUYgHspYDkLWEm9F4pbvVOtMrFXX
32
32
  tinybird/tb/modules/endpoint.py,sha256=XySDt3pk66vxOZ0egUfz4bY8bEk3BjOXkv-L0OIJ3sc,12083
33
33
  tinybird/tb/modules/exceptions.py,sha256=5jK91w1LPmtqIUfDpHe_Op5OxGz8-p1BPgtLREMIni0,5217
34
34
  tinybird/tb/modules/feedback_manager.py,sha256=cnMGTCXa04Zmwq0tPHuAeq_hxqTz3F8c7mXqTJ-MZsw,76920
35
- tinybird/tb/modules/info.py,sha256=qsXr2g45jRv2xD4Kt2sgsT0AR8sjwrAZf2s7mI-zxL4,6113
35
+ tinybird/tb/modules/info.py,sha256=NqSsoyzFqbtUEGH_tSowNOI_jSsNuixibln6-plsfOY,6810
36
36
  tinybird/tb/modules/infra.py,sha256=fve30Gj3mG9zbquGxS2e4ipcOYOxviWQCpNFfEzJN_Q,33195
37
37
  tinybird/tb/modules/job.py,sha256=AsUCRNzy7HG5oJ4fyk9NpIm5NtNJgBZSy8MtJdXBe5A,3167
38
38
  tinybird/tb/modules/llm.py,sha256=KfsCYmKeW1VQz0iDZhGKCRkQv_Y3kTHh6JuxvofOguE,1076
@@ -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.dev209.dist-info/METADATA,sha256=Yr_qPcTXA5dwCPMfgHhG8R-Ll3z9syRorgMG7it0F4g,1682
84
- tinybird-0.0.1.dev209.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
85
- tinybird-0.0.1.dev209.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
86
- tinybird-0.0.1.dev209.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
87
- tinybird-0.0.1.dev209.dist-info/RECORD,,
83
+ tinybird-0.0.1.dev210.dist-info/METADATA,sha256=o32bxuzCr9smZP4A_c1Q2fGG8gKr5IrRiEueTbiXIQA,1682
84
+ tinybird-0.0.1.dev210.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
85
+ tinybird-0.0.1.dev210.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
86
+ tinybird-0.0.1.dev210.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
87
+ tinybird-0.0.1.dev210.dist-info/RECORD,,