tinybird 0.0.1.dev215__py3-none-any.whl → 0.0.1.dev217__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.dev215'
8
- __revision__ = 'cdd01a6'
7
+ __version__ = '0.0.1.dev217'
8
+ __revision__ = '8183690'
@@ -379,6 +379,15 @@ async def create_ctx_client(ctx: Context, config: Dict[str, Any], cloud: bool, s
379
379
  click.echo(
380
380
  FeedbackManager.gray(message=f"Running against Tinybird Cloud: Workspace {config.get('name', 'default')}")
381
381
  )
382
+
383
+ method = None
384
+ if ctx.params.get("token"):
385
+ method = "token via --token option"
386
+ elif os.environ.get("TB_TOKEN"):
387
+ method = "token from TB_TOKEN environment variable"
388
+ if method:
389
+ click.echo(FeedbackManager.gray(message=f"Authentication method: {method}"))
390
+
382
391
  return _get_tb_client(config.get("token", None), config["host"], staging=staging)
383
392
  local = command in commands_always_local
384
393
  test = command in command_always_test
@@ -318,41 +318,21 @@ line experience. To opt-out, set TB_CLI_TELEMETRY_OPTOUT to '1' or 'true'."""
318
318
 
319
319
  # Only suggest if the similarity score is high enough (adjust threshold as needed)
320
320
  if score >= 65:
321
- # Initialize lists for arguments before and after command
322
- args_before_cmd: List[str] = []
323
- args_after_cmd: List[str] = []
324
-
325
- # Reconstruct the full command with all arguments
326
- full_command = ctx.command_path # Gets the base command (e.g., 'tb')
327
-
328
- # Add any options/arguments that came before the command
329
- if ctx.args:
330
- found_cmd = False
331
- for arg in ctx.args:
332
- if arg == cmd_name:
333
- found_cmd = True
334
- elif found_cmd:
335
- args_after_cmd.append(arg)
336
- else:
337
- args_before_cmd.append(arg)
338
-
339
- if args_before_cmd:
340
- full_command += " " + " ".join(args_before_cmd)
341
-
342
- # Add any options from params
343
- if ctx.params:
344
- for param, value in ctx.params.items():
345
- if value is True:
346
- full_command += f" --{param}"
347
- elif value is not False and value is not None:
348
- full_command += f" --{param} {value}"
349
-
350
- # Add the suggested command
351
- full_command += f" {suggestion}"
352
-
353
- # Add any arguments that came after the command
354
- if args_after_cmd:
355
- full_command += " " + " ".join(args_after_cmd)
321
+ # Build the suggested command from the raw arguments,
322
+ # preserving only those explicitly passed by the user.
323
+ raw_args = sys.argv[1:]
324
+ try:
325
+ idx = raw_args.index(cmd_name)
326
+ except ValueError:
327
+ # If the mistyped command isn't found, use all as 'after'.
328
+ before = []
329
+ after = raw_args
330
+ else:
331
+ before = raw_args[:idx]
332
+ after = raw_args[idx + 1 :]
333
+
334
+ full_tokens = [ctx.command_path, *before, suggestion, *after]
335
+ full_command = " ".join(full_tokens)
356
336
 
357
337
  click.echo(f"\nWARNING: '{cmd_name}' is not a valid command. ", nl=False)
358
338
  # Ask for confirmation
@@ -98,8 +98,9 @@ async def stop() -> None:
98
98
 
99
99
 
100
100
  @local.command()
101
+ @click.pass_context
101
102
  @coro
102
- async def status() -> None:
103
+ async def status(ctx: click.Context) -> None:
103
104
  """Check status of Tinybird Local"""
104
105
  docker_client = get_docker_client()
105
106
  container = get_existing_container_with_matching_env(docker_client, TB_CONTAINER_NAME, {})
@@ -110,6 +111,11 @@ async def status() -> None:
110
111
 
111
112
  if status == "running" and health == "healthy":
112
113
  click.echo(FeedbackManager.success(message="✓ Tinybird Local is ready!"))
114
+ click.echo(FeedbackManager.highlight(message="\n» Tinybird Local:"))
115
+ from tinybird.tb.modules.info import get_local_info
116
+
117
+ config = ctx.ensure_object(dict).get("config", {})
118
+ await get_local_info(config)
113
119
  elif status == "restarting" or (status == "running" and health == "starting"):
114
120
  click.echo(FeedbackManager.highlight(message="* Tinybird Local is starting..."))
115
121
  elif status == "removing":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev215
3
+ Version: 0.0.1.dev217
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/forward/commands
6
6
  Author: Tinybird
@@ -17,15 +17,15 @@ tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1w
17
17
  tinybird/datafile/parse_connection.py,sha256=tRyn2Rpr1TeWet5BXmMoQgaotbGdYep1qiTak_OqC5E,1825
18
18
  tinybird/datafile/parse_datasource.py,sha256=ssW8QeFSgglVFi3sDZj_HgkJiTJ2069v2JgqnH3CkDE,1825
19
19
  tinybird/datafile/parse_pipe.py,sha256=xf4m0Tw44QWJzHzAm7Z7FwUoUUtr7noMYjU1NiWnX0k,3880
20
- tinybird/tb/__cli__.py,sha256=7SUurDL5cvd_jq8kgVKbNv0nYu14klnwH04iy8Jzih0,247
20
+ tinybird/tb/__cli__.py,sha256=OxPmIwk3yALyFV0o7kbsBKMGiygz9074h1m810h0B1I,247
21
21
  tinybird/tb/check_pypi.py,sha256=i3l2L8IajeB7sreikR7oPlYJki9MtS3c_M4crnmbByc,760
22
22
  tinybird/tb/cli.py,sha256=0xYk2Ip4vb3nNFbxfTdG3VoIgdRvUKVbUVU_mviErPA,1107
23
23
  tinybird/tb/client.py,sha256=FKj61vY9STPW03kfVcxYuY1_csI-kP-mc1ERQfqJtg8,56505
24
24
  tinybird/tb/config.py,sha256=jT9xndpeCY_g0HdB5qE2EquC0TFRRnkPnQFWZWd04jo,3998
25
25
  tinybird/tb/modules/build.py,sha256=T36msoBK5g9AZlrJnFRPvlZbrdE265LY1q3Y4YqvS3w,20067
26
26
  tinybird/tb/modules/cicd.py,sha256=Njb6eZOHHbUkoJJx6KoixO9PsfA_T-3Ybkya9-50Ca8,7328
27
- tinybird/tb/modules/cli.py,sha256=k6Bp-lWC-ruMMB47lxwsinLQt4qJL_n84hjyxi9JYt4,15676
28
- tinybird/tb/modules/common.py,sha256=nzAF52gkDPx1_LKg3l-j1Ko9Y1o_Wq9dYxxhu47bAeg,84221
27
+ tinybird/tb/modules/cli.py,sha256=zTUob6oSZszCx-lk6MJbQ_VuNOXBo8b0DOHPWezzMOg,15997
28
+ tinybird/tb/modules/common.py,sha256=WWvbDSQmyYUy9Xyc_BqtrdRzpDdzLuE9i_pWhoA1a8k,83440
29
29
  tinybird/tb/modules/config.py,sha256=VnzYVUo4q1RBEEMMce4_OCrKp4erhgkRPHElydVlKj0,11488
30
30
  tinybird/tb/modules/connection.py,sha256=rdEsdcP-AqyHiW3KNoETGPeTjk7Wt3It6z_SnmInGcc,18648
31
31
  tinybird/tb/modules/copy.py,sha256=zHN1d5NA-MFsgbk2kKJq2P9qA8dNOnIsIa60QpVnSwc,4458
@@ -42,7 +42,7 @@ tinybird/tb/modules/infra.py,sha256=fve30Gj3mG9zbquGxS2e4ipcOYOxviWQCpNFfEzJN_Q,
42
42
  tinybird/tb/modules/job.py,sha256=AsUCRNzy7HG5oJ4fyk9NpIm5NtNJgBZSy8MtJdXBe5A,3167
43
43
  tinybird/tb/modules/llm.py,sha256=KfsCYmKeW1VQz0iDZhGKCRkQv_Y3kTHh6JuxvofOguE,1076
44
44
  tinybird/tb/modules/llm_utils.py,sha256=nS9r4FAElJw8yXtmdYrx-rtI2zXR8qXfi1QqUDCfxvg,3469
45
- tinybird/tb/modules/local.py,sha256=mLSgMMP3H1MdanVLsFZieeqOANSnctPLey3pJ_L1ZBI,5807
45
+ tinybird/tb/modules/local.py,sha256=TWT7pGXQ3cOy0M_piyw7WhrzoxZE18PmfOLzHD5CoEc,6096
46
46
  tinybird/tb/modules/local_common.py,sha256=8CSEVygFi0fIISatYxCStcHizugXCA9WNTLO_zDKmXw,17195
47
47
  tinybird/tb/modules/login.py,sha256=qfY17J3FryTPl8A0ucQgxiyJ7jLy81qHdlHXgqohi0c,10170
48
48
  tinybird/tb/modules/logout.py,sha256=sniI4JNxpTrVeRCp0oGJuQ3yRerG4hH5uz6oBmjv724,1009
@@ -82,8 +82,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
82
82
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
83
83
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
84
84
  tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
85
- tinybird-0.0.1.dev215.dist-info/METADATA,sha256=zGTBhqtryJztGGmmcNeOBfOqUV49VhZQgyA3RxGnmog,1682
86
- tinybird-0.0.1.dev215.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
87
- tinybird-0.0.1.dev215.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
88
- tinybird-0.0.1.dev215.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
89
- tinybird-0.0.1.dev215.dist-info/RECORD,,
85
+ tinybird-0.0.1.dev217.dist-info/METADATA,sha256=27wjBn2jycV_6ZCDWRPNxVvGkg_cVt3iV-TKcnBaOtA,1682
86
+ tinybird-0.0.1.dev217.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
87
+ tinybird-0.0.1.dev217.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
88
+ tinybird-0.0.1.dev217.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
89
+ tinybird-0.0.1.dev217.dist-info/RECORD,,