tinybird 0.0.1.dev110__py3-none-any.whl → 0.0.1.dev111__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/cli/introduction.html'
5
5
  __author__ = 'Tinybird'
6
6
  __author_email__ = 'support@tinybird.co'
7
- __version__ = '0.0.1.dev110'
8
- __revision__ = '034b6bf'
7
+ __version__ = '0.0.1.dev111'
8
+ __revision__ = '621864a'
@@ -1,8 +1,9 @@
1
1
  import os
2
- from typing import List, Optional
2
+ from typing import Dict, Optional
3
3
 
4
4
  import click
5
5
 
6
+ from tinybird.sql_template import render_template_with_secrets
6
7
  from tinybird.tb.modules.datafile.common import (
7
8
  Datafile,
8
9
  DatafileKind,
@@ -21,7 +22,7 @@ def parse_datasource(
21
22
  skip_eval: bool = False,
22
23
  hide_folders: bool = False,
23
24
  add_context_to_datafile_syntax_errors: bool = True,
24
- secrets: Optional[List[str]] = None,
25
+ secrets: Optional[Dict[str, str]] = None,
25
26
  ) -> Datafile:
26
27
  basepath = ""
27
28
  if not content:
@@ -31,6 +32,7 @@ def parse_datasource(
31
32
  else:
32
33
  s = content
33
34
 
35
+ s = render_template_with_secrets(filename, s, secrets=secrets or {})
34
36
  filename = format_filename(filename, hide_folders)
35
37
  try:
36
38
  doc = parse(
@@ -1,5 +1,5 @@
1
1
  import os
2
- from typing import List, Optional
2
+ from typing import Dict, Optional
3
3
 
4
4
  import click
5
5
 
@@ -23,7 +23,7 @@ def parse_pipe(
23
23
  skip_eval: bool = False,
24
24
  hide_folders: bool = False,
25
25
  add_context_to_datafile_syntax_errors: bool = True,
26
- secrets: Optional[List[str]] = None,
26
+ secrets: Optional[Dict[str, str]] = None,
27
27
  ) -> Datafile:
28
28
  basepath = ""
29
29
  if not content:
@@ -130,7 +130,7 @@ def get_docker_client() -> DockerClient:
130
130
  )
131
131
 
132
132
 
133
- def get_use_aws_creds():
133
+ def get_use_aws_creds() -> dict[str, str]:
134
134
  credentials: dict[str, str] = {}
135
135
  try:
136
136
  # Get the boto3 session and credentials
@@ -149,14 +149,29 @@ def get_use_aws_creds():
149
149
  # Add region if available
150
150
  if session.region_name:
151
151
  credentials["AWS_DEFAULT_REGION"] = session.region_name
152
- except Exception:
153
- # TODO (rbarbadillo): We should handle this better. If users don't have AWS credentials, most times it's fine
154
- # but if they want to use S3, they'll need a warning.
155
- pass
152
+
153
+ click.echo(
154
+ FeedbackManager.success(
155
+ message=f"✓ AWS credentials found and will be passed to Tinybird Local (region: {session.region_name or 'not set'})"
156
+ )
157
+ )
158
+ else:
159
+ click.echo(
160
+ FeedbackManager.warning(
161
+ message="△ No AWS credentials found. S3 operations will not work in Tinybird Local."
162
+ )
163
+ )
164
+ except Exception as e:
165
+ click.echo(
166
+ FeedbackManager.warning(
167
+ message=f"△ Error retrieving AWS credentials: {str(e)}. S3 operations will not work in Tinybird Local."
168
+ )
169
+ )
170
+
156
171
  return credentials
157
172
 
158
173
 
159
- def stop_tinybird_local(docker_client):
174
+ def stop_tinybird_local(docker_client: DockerClient) -> None:
160
175
  """Stop the Tinybird container."""
161
176
  try:
162
177
  container = docker_client.containers.get(TB_CONTAINER_NAME)
@@ -165,7 +180,7 @@ def stop_tinybird_local(docker_client):
165
180
  pass
166
181
 
167
182
 
168
- def remove_tinybird_local(docker_client):
183
+ def remove_tinybird_local(docker_client: DockerClient) -> None:
169
184
  """Remove the Tinybird container."""
170
185
  try:
171
186
  container = docker_client.containers.get(TB_CONTAINER_NAME)
@@ -181,7 +196,7 @@ def remove_tinybird_local(docker_client):
181
196
  pass
182
197
 
183
198
 
184
- def update_cli():
199
+ def update_cli() -> None:
185
200
  click.echo(FeedbackManager.highlight(message="» Updating Tinybird CLI..."))
186
201
 
187
202
  try:
@@ -205,20 +220,20 @@ def update_cli():
205
220
 
206
221
 
207
222
  @cli.command()
208
- def update():
223
+ def update() -> None:
209
224
  """Update Tinybird CLI to the latest version."""
210
225
  update_cli()
211
226
 
212
227
 
213
228
  @cli.command(name="upgrade", hidden=True)
214
- def upgrade():
229
+ def upgrade() -> None:
215
230
  """Update Tinybird CLI to the latest version."""
216
231
  update_cli()
217
232
 
218
233
 
219
234
  @cli.group()
220
235
  @click.pass_context
221
- def local(ctx):
236
+ def local(ctx: click.Context) -> None:
222
237
  """Manage the local Tinybird instance."""
223
238
 
224
239
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev110
3
+ Version: 0.0.1.dev111
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -15,7 +15,7 @@ tinybird/syncasync.py,sha256=IPnOx6lMbf9SNddN1eBtssg8vCLHMt76SuZ6YNYm-Yk,27761
15
15
  tinybird/tornado_template.py,sha256=jjNVDMnkYFWXflmT8KU_Ssbo5vR8KQq3EJMk5vYgXRw,41959
16
16
  tinybird/ch_utils/constants.py,sha256=aYvg2C_WxYWsnqPdZB1ZFoIr8ZY-XjUXYyHKE9Ansj0,3890
17
17
  tinybird/ch_utils/engine.py,sha256=BZuPM7MFS7vaEKK5tOMR2bwSAgJudPrJt27uVEwZmTY,40512
18
- tinybird/tb/__cli__.py,sha256=nWZHU4E-KvHLB4OyR1gFO9T0XZFvxUwB3SRqcAoINyU,252
18
+ tinybird/tb/__cli__.py,sha256=I7Yrc9jlvEPM-x0iwreh6-Gh2UYMf4--ijbZe2x9G78,252
19
19
  tinybird/tb/cli.py,sha256=H_HaZhkimKgkryYXpBjHfY9Qtg-ZORiONU3psDNpzDk,1135
20
20
  tinybird/tb/modules/auth.py,sha256=L1IatO2arRSzys3t8px8xVt8uPWUL5EVD0sFzAV_uVU,9022
21
21
  tinybird/tb/modules/build.py,sha256=h5drdmDFX8NHts9dA2Zepao7KSgMAl3DZGyFufVZP78,11085
@@ -36,7 +36,7 @@ tinybird/tb/modules/infra.py,sha256=GA5xnYLlVItPfJu_3_5NIdHQDuyfk2Z71wtcn9NncGA,
36
36
  tinybird/tb/modules/job.py,sha256=956Pj8BEEsiD2GZsV9RKKVM3I_CveOLgS82lykO5ukk,2963
37
37
  tinybird/tb/modules/llm.py,sha256=AC0VSphTOM2t-v1_3NLvNN_FIbgMo4dTyMqIv5nniPo,835
38
38
  tinybird/tb/modules/llm_utils.py,sha256=nS9r4FAElJw8yXtmdYrx-rtI2zXR8qXfi1QqUDCfxvg,3469
39
- tinybird/tb/modules/local.py,sha256=CYc35OxihraGUD3frLemz_7Tz_q6zZ9nf___CT1teuI,9332
39
+ tinybird/tb/modules/local.py,sha256=VZZVHVsqf5BTQdwSNFII5IXjpsK6xoHGdv4zD-WclWc,9912
40
40
  tinybird/tb/modules/local_common.py,sha256=RN5OEncHdq7ua4AZ--WgKtaFuEsLvIhq_ROHJadRXXA,3188
41
41
  tinybird/tb/modules/login.py,sha256=lLCJ1kIq3sLcoSMH1kZge5isHh-fDwHPRHApIqbaCkw,6350
42
42
  tinybird/tb/modules/logout.py,sha256=ULooy1cDBD02-r7voZmhV7udA0ML5tVuflJyShrh56Y,1022
@@ -68,8 +68,8 @@ tinybird/tb/modules/datafile/fixture.py,sha256=si-9LB-LdKQSWDtVW82xDrHtFfko5bgBG
68
68
  tinybird/tb/modules/datafile/format_common.py,sha256=WaNV4tXrQU5gjV6MJP-5TGqg_Bre6ilNS8emvFl-X3c,1967
69
69
  tinybird/tb/modules/datafile/format_datasource.py,sha256=gpRsGnDEMxEo0pIlEHXKvyuwKIpqJJUCN9JRSiDYs_4,6156
70
70
  tinybird/tb/modules/datafile/format_pipe.py,sha256=58iSTrJ5lg-IsbpX8TQumQTuZ6UIotMsCIkNJd1M-pM,7418
71
- tinybird/tb/modules/datafile/parse_datasource.py,sha256=BNof0FnaIVZUG5ORFtZSw-gUmWID4o2ZQLVgfVIuHRI,1566
72
- tinybird/tb/modules/datafile/parse_pipe.py,sha256=tBjh3-I0iq7JdtB84RPYFrUlUOF2ZYWgQ_mwW5SPgmI,3467
71
+ tinybird/tb/modules/datafile/parse_datasource.py,sha256=cW08P_IaSl3kI3-ApjPW9BZTNaClkeC28Y7nwEw6KRE,1707
72
+ tinybird/tb/modules/datafile/parse_pipe.py,sha256=cGz83DLCZ9y4N9_h5PumpUy3QzhBGu1JC68h1siy5WM,3472
73
73
  tinybird/tb/modules/datafile/pipe_checker.py,sha256=LnDLGIHLJ3N7qHb2ptEbPr8CoczNfGwpjOY8EMdxfHQ,24649
74
74
  tinybird/tb/modules/datafile/playground.py,sha256=7yblQh3jlNfdY0ySSCBrXTK6mE9e0TFI-TbaGGV-qBE,56545
75
75
  tinybird/tb/modules/datafile/pull.py,sha256=vcjMUbjnZ9XQMGmL33J3ElpbXBTat8Yzp-haeDggZd4,5967
@@ -81,8 +81,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
81
81
  tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
82
82
  tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
83
83
  tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
84
- tinybird-0.0.1.dev110.dist-info/METADATA,sha256=lQOlesa4BTowVCtRXrLSiOr1GzGDu5MUncxDYbXbWgI,1612
85
- tinybird-0.0.1.dev110.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
86
- tinybird-0.0.1.dev110.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
87
- tinybird-0.0.1.dev110.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
88
- tinybird-0.0.1.dev110.dist-info/RECORD,,
84
+ tinybird-0.0.1.dev111.dist-info/METADATA,sha256=Od6iCtY8gfCnixP673yRdEc2fR8aRC3dgMrIt4NF15Y,1612
85
+ tinybird-0.0.1.dev111.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
86
+ tinybird-0.0.1.dev111.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
87
+ tinybird-0.0.1.dev111.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
88
+ tinybird-0.0.1.dev111.dist-info/RECORD,,