tinybird 0.0.1.dev299__py3-none-any.whl → 0.0.1.dev301__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/connectors.py +1 -7
- tinybird/datafile/common.py +6 -7
- tinybird/service_datasources.py +54 -0
- tinybird/tb/__cli__.py +2 -2
- tinybird/tb/client.py +0 -4
- tinybird/tb/modules/agent/agent.py +39 -8
- tinybird/tb/modules/agent/utils.py +1 -1
- tinybird/tb/modules/build.py +2 -2
- tinybird/tb/modules/build_common.py +2 -2
- tinybird/tb/modules/cli.py +1 -1
- tinybird/tb/modules/common.py +2 -2
- tinybird/tb/modules/datafile/diff.py +1 -1
- tinybird/tb/modules/datafile/format_pipe.py +1 -1
- tinybird/tb/modules/exceptions.py +7 -0
- tinybird/tb/modules/local.py +1 -1
- tinybird/tb/modules/local_common.py +2 -2
- tinybird/tb/modules/shell.py +1 -1
- tinybird/tb_cli_modules/common.py +2 -2
- tinybird/tornado_template.py +3 -3
- {tinybird-0.0.1.dev299.dist-info → tinybird-0.0.1.dev301.dist-info}/METADATA +3 -3
- {tinybird-0.0.1.dev299.dist-info → tinybird-0.0.1.dev301.dist-info}/RECORD +24 -24
- {tinybird-0.0.1.dev299.dist-info → tinybird-0.0.1.dev301.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev299.dist-info → tinybird-0.0.1.dev301.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev299.dist-info → tinybird-0.0.1.dev301.dist-info}/top_level.txt +0 -0
tinybird/connectors.py
CHANGED
|
@@ -369,13 +369,7 @@ class Snowflake(Connector):
|
|
|
369
369
|
the_type = "String"
|
|
370
370
|
if t.startswith("NUMBER"):
|
|
371
371
|
the_type = "Int32"
|
|
372
|
-
if (
|
|
373
|
-
t.startswith("FLOAT")
|
|
374
|
-
or t.startswith("DOUBLE")
|
|
375
|
-
or t.startswith("REAL")
|
|
376
|
-
or t.startswith("NUMERIC")
|
|
377
|
-
or t.startswith("DECIMAL")
|
|
378
|
-
):
|
|
372
|
+
if t.startswith(("FLOAT", "DOUBLE", "REAL", "NUMERIC", "DECIMAL")):
|
|
379
373
|
the_type = "Float32"
|
|
380
374
|
if t == "DATE":
|
|
381
375
|
the_type = "Date"
|
tinybird/datafile/common.py
CHANGED
|
@@ -630,7 +630,10 @@ class Datafile:
|
|
|
630
630
|
def _validate_single_column(self, col_name: str, column_info: Dict[str, Any]) -> None:
|
|
631
631
|
"""Validate a single column for use in sorting keys."""
|
|
632
632
|
col_type = column_info.get("type", "").lower()
|
|
633
|
-
|
|
633
|
+
|
|
634
|
+
# we need to check any presence of Nullable in the column type
|
|
635
|
+
is_nullable = column_info.get("nullable", False) or "Nullable(" in column_info.get("type", "")
|
|
636
|
+
|
|
634
637
|
if is_nullable:
|
|
635
638
|
raise DatafileValidationError(
|
|
636
639
|
f"Sorting key contains nullable column '{col_name}'. Nullable columns cannot be used in sorting keys."
|
|
@@ -2048,11 +2051,7 @@ def parse(
|
|
|
2048
2051
|
lexer = list(sa)
|
|
2049
2052
|
if lexer:
|
|
2050
2053
|
cmd, args = lexer[0], lexer[1:]
|
|
2051
|
-
if (
|
|
2052
|
-
parser_state.multiline
|
|
2053
|
-
and cmd.lower() in cmds
|
|
2054
|
-
and not (line.startswith(" ") or line.startswith("\t"))
|
|
2055
|
-
):
|
|
2054
|
+
if parser_state.multiline and cmd.lower() in cmds and not line.startswith((" ", "\t")):
|
|
2056
2055
|
cmds[parser_state.command](
|
|
2057
2056
|
parser_state.multiline_string,
|
|
2058
2057
|
lineno=lineno,
|
|
@@ -2505,7 +2504,7 @@ def is_file_a_datasource(filename: str) -> bool:
|
|
|
2505
2504
|
|
|
2506
2505
|
for line in lines:
|
|
2507
2506
|
trimmed_line = line.strip().lower()
|
|
2508
|
-
if trimmed_line.startswith("schema"
|
|
2507
|
+
if trimmed_line.startswith(("schema", "engine")):
|
|
2509
2508
|
return True
|
|
2510
2509
|
|
|
2511
2510
|
return False
|
tinybird/service_datasources.py
CHANGED
|
@@ -428,6 +428,33 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
|
|
|
428
428
|
{"name": "total_cpu_time_seconds", "type": "Float64"},
|
|
429
429
|
],
|
|
430
430
|
},
|
|
431
|
+
{
|
|
432
|
+
"name": "tinybird.llm_usage",
|
|
433
|
+
"description": "LLM usage metrics from Tinybird AI features including token consumption, costs, and model usage for each request in the workspace.",
|
|
434
|
+
"dateColumn": "start_time",
|
|
435
|
+
"engine": {
|
|
436
|
+
"engine": "MergeTree",
|
|
437
|
+
"sorting_key": "workspace_id, start_time, user_email, request_id",
|
|
438
|
+
"partition_key": "toYYYYMM(start_time)",
|
|
439
|
+
},
|
|
440
|
+
"columns": [
|
|
441
|
+
{"name": "start_time", "type": "DateTime"},
|
|
442
|
+
{"name": "end_time", "type": "DateTime"},
|
|
443
|
+
{"name": "organization_id", "type": "String"},
|
|
444
|
+
{"name": "organization_name", "type": "String"},
|
|
445
|
+
{"name": "workspace_id", "type": "String"},
|
|
446
|
+
{"name": "workspace_name", "type": "String"},
|
|
447
|
+
{"name": "user_email", "type": "String"},
|
|
448
|
+
{"name": "request_id", "type": "String"},
|
|
449
|
+
{"name": "prompt_tokens", "type": "UInt32"},
|
|
450
|
+
{"name": "completion_tokens", "type": "UInt32"},
|
|
451
|
+
{"name": "total_tokens", "type": "UInt32"},
|
|
452
|
+
{"name": "duration", "type": "Float32"},
|
|
453
|
+
{"name": "cost", "type": "Float32"},
|
|
454
|
+
{"name": "origin", "type": "String"},
|
|
455
|
+
{"name": "feature", "type": "String"},
|
|
456
|
+
],
|
|
457
|
+
},
|
|
431
458
|
]
|
|
432
459
|
|
|
433
460
|
|
|
@@ -881,6 +908,33 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
|
|
|
881
908
|
{"name": "total_written_bytes", "type": "UInt64"},
|
|
882
909
|
],
|
|
883
910
|
},
|
|
911
|
+
{
|
|
912
|
+
"name": "organization.llm_usage",
|
|
913
|
+
"description": "LLM usage metrics from Tinybird AI features including token consumption, costs, and model usage for each request in the organization.",
|
|
914
|
+
"dateColumn": "start_time",
|
|
915
|
+
"engine": {
|
|
916
|
+
"engine": "MergeTree",
|
|
917
|
+
"sorting_key": "workspace_id, start_time, user_email, request_id",
|
|
918
|
+
"partition_key": "toYYYYMM(start_time)",
|
|
919
|
+
},
|
|
920
|
+
"columns": [
|
|
921
|
+
{"name": "start_time", "type": "DateTime"},
|
|
922
|
+
{"name": "end_time", "type": "DateTime"},
|
|
923
|
+
{"name": "organization_id", "type": "String"},
|
|
924
|
+
{"name": "organization_name", "type": "String"},
|
|
925
|
+
{"name": "workspace_id", "type": "String"},
|
|
926
|
+
{"name": "workspace_name", "type": "String"},
|
|
927
|
+
{"name": "user_email", "type": "String"},
|
|
928
|
+
{"name": "request_id", "type": "String"},
|
|
929
|
+
{"name": "prompt_tokens", "type": "UInt32"},
|
|
930
|
+
{"name": "completion_tokens", "type": "UInt32"},
|
|
931
|
+
{"name": "total_tokens", "type": "UInt32"},
|
|
932
|
+
{"name": "duration", "type": "Float32"},
|
|
933
|
+
{"name": "cost", "type": "Float32"},
|
|
934
|
+
{"name": "origin", "type": "String"},
|
|
935
|
+
{"name": "feature", "type": "String"},
|
|
936
|
+
],
|
|
937
|
+
},
|
|
884
938
|
]
|
|
885
939
|
|
|
886
940
|
|
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.dev301'
|
|
8
|
+
__revision__ = '1ce40fd'
|
tinybird/tb/client.py
CHANGED
|
@@ -1390,7 +1390,3 @@ class TinyB:
|
|
|
1390
1390
|
|
|
1391
1391
|
def delete_tag(self, name: str):
|
|
1392
1392
|
self._req(f"/v0/tags/{name}", method="DELETE")
|
|
1393
|
-
|
|
1394
|
-
def explore_data(self, prompt: str) -> str:
|
|
1395
|
-
params = urlencode({"prompt": prompt, "host": self.host, "origin": "cli"})
|
|
1396
|
-
return self._req(f"/v1/agents/explore?{params}")
|
|
@@ -7,7 +7,7 @@ import urllib.parse
|
|
|
7
7
|
import uuid
|
|
8
8
|
from functools import partial
|
|
9
9
|
from pathlib import Path
|
|
10
|
-
from typing import Any, Optional
|
|
10
|
+
from typing import Any, Callable, Optional
|
|
11
11
|
|
|
12
12
|
import click
|
|
13
13
|
import humanfriendly
|
|
@@ -67,6 +67,7 @@ from tinybird.tb.modules.common import (
|
|
|
67
67
|
echo_safe_humanfriendly_tables_format_pretty_table,
|
|
68
68
|
get_region_from_host,
|
|
69
69
|
get_regions,
|
|
70
|
+
sys_exit,
|
|
70
71
|
update_cli,
|
|
71
72
|
)
|
|
72
73
|
from tinybird.tb.modules.config import CLIConfig
|
|
@@ -428,7 +429,6 @@ class TinybirdAgent:
|
|
|
428
429
|
save_messages(new_messages)
|
|
429
430
|
self.thinking_animation.stop()
|
|
430
431
|
click.echo(result.output)
|
|
431
|
-
self.echo_usage(config)
|
|
432
432
|
|
|
433
433
|
async def run_iter(self, user_prompt: str, config: dict[str, Any], run_id: Optional[str] = None) -> None:
|
|
434
434
|
model = create_model(self.user_token, self.host, self.workspace_id, run_id=run_id)
|
|
@@ -455,28 +455,57 @@ class TinybirdAgent:
|
|
|
455
455
|
self.messages.extend(new_messages)
|
|
456
456
|
save_messages(new_messages)
|
|
457
457
|
self.thinking_animation.stop()
|
|
458
|
-
self.echo_usage(config)
|
|
459
458
|
|
|
460
|
-
def echo_usage(self, config: dict[str, Any]) -> None:
|
|
459
|
+
def echo_usage(self, config: dict[str, Any], show_credits: bool = False) -> None:
|
|
461
460
|
try:
|
|
462
461
|
client = _get_tb_client(config["user_token"], config["host"])
|
|
463
462
|
workspace_id = config.get("id", "")
|
|
464
463
|
workspace = client.workspace(workspace_id, with_organization=True, version="v1")
|
|
464
|
+
is_free_plan = workspace["organization"]["plan"].get("billing") == "free_shared_infrastructure_usage"
|
|
465
|
+
|
|
466
|
+
if not is_free_plan and not show_credits:
|
|
467
|
+
return
|
|
468
|
+
|
|
465
469
|
limits_data = client.organization_limits(workspace["organization"]["id"])
|
|
466
470
|
llm_usage_limits = limits_data.get("limits", {}).get("llm_usage", {})
|
|
467
471
|
current_llm_usage = llm_usage_limits.get("quantity") or 0
|
|
468
472
|
llm_usage = llm_usage_limits.get("max") or 0
|
|
469
473
|
remaining_credits = round(max(llm_usage - current_llm_usage, 0), 2)
|
|
470
474
|
current_llm_usage = round(min(llm_usage, current_llm_usage), 2)
|
|
475
|
+
|
|
471
476
|
if not llm_usage:
|
|
472
477
|
return
|
|
473
|
-
|
|
474
|
-
|
|
478
|
+
|
|
479
|
+
def get_message(current_llm_usage, llm_usage: int) -> tuple[Callable[..., str], str, bool]:
|
|
480
|
+
warning_threshold = llm_usage * 0.8
|
|
481
|
+
ui_host = get_display_cloud_host(config["host"])
|
|
482
|
+
|
|
483
|
+
if is_free_plan:
|
|
484
|
+
upgrade_link = f"{ui_host}/organizations/{workspace['organization']['name']}/upgrade?from=agent"
|
|
485
|
+
if current_llm_usage >= llm_usage:
|
|
486
|
+
return (
|
|
487
|
+
FeedbackManager.error,
|
|
488
|
+
f" You have reached the maximum number of credits. Please upgrade to continue using Tinybird Code: {upgrade_link}",
|
|
489
|
+
True,
|
|
490
|
+
)
|
|
491
|
+
if current_llm_usage >= warning_threshold:
|
|
492
|
+
return (
|
|
493
|
+
FeedbackManager.warning,
|
|
494
|
+
f" You are reaching the maximum number of credits. Please upgrade to continue using Tinybird Code: {upgrade_link}",
|
|
495
|
+
False,
|
|
496
|
+
)
|
|
497
|
+
return FeedbackManager.gray, "", False
|
|
498
|
+
|
|
499
|
+
message_color, upgrade_message, should_exit = get_message(current_llm_usage, llm_usage)
|
|
475
500
|
click.echo(
|
|
476
501
|
message_color(
|
|
477
|
-
message=f"{remaining_credits} credits left ({current_llm_usage}/{llm_usage}).
|
|
502
|
+
message=f"{remaining_credits} credits left ({current_llm_usage}/{llm_usage}).{upgrade_message}"
|
|
478
503
|
)
|
|
479
504
|
)
|
|
505
|
+
|
|
506
|
+
if should_exit:
|
|
507
|
+
sys_exit("tinybird_code_error", "Maximum number of credits reached")
|
|
508
|
+
|
|
480
509
|
except Exception:
|
|
481
510
|
pass
|
|
482
511
|
|
|
@@ -577,7 +606,6 @@ def run_agent(
|
|
|
577
606
|
)
|
|
578
607
|
)
|
|
579
608
|
agent.echo_usage(config)
|
|
580
|
-
click.echo()
|
|
581
609
|
|
|
582
610
|
except Exception as e:
|
|
583
611
|
click.echo(FeedbackManager.error(message=f"Failed to initialize agent: {e}"))
|
|
@@ -630,6 +658,9 @@ def run_agent(
|
|
|
630
658
|
elif user_input.lower() == "/help":
|
|
631
659
|
subprocess.run(["tb", "--help"], check=True)
|
|
632
660
|
continue
|
|
661
|
+
elif user_input.lower() == "/usage":
|
|
662
|
+
agent.echo_usage(config, show_credits=True)
|
|
663
|
+
continue
|
|
633
664
|
elif user_input.strip() == "":
|
|
634
665
|
continue
|
|
635
666
|
else:
|
|
@@ -512,7 +512,7 @@ def create_terminal_box(content: str, new_content: Optional[str] = None, title:
|
|
|
512
512
|
new_line_num = int(match.group(2))
|
|
513
513
|
old_index = old_line_num - 1
|
|
514
514
|
new_index = new_line_num - 1
|
|
515
|
-
elif line.startswith("---"
|
|
515
|
+
elif line.startswith(("---", "+++")):
|
|
516
516
|
# Skip file headers
|
|
517
517
|
pass
|
|
518
518
|
elif line.startswith(" "):
|
tinybird/tb/modules/build.py
CHANGED
|
@@ -8,7 +8,7 @@ from urllib.parse import urlencode
|
|
|
8
8
|
|
|
9
9
|
import click
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
from tinybird import context
|
|
12
12
|
from tinybird.datafile.exceptions import ParseException
|
|
13
13
|
from tinybird.datafile.parse_datasource import parse_datasource
|
|
14
14
|
from tinybird.datafile.parse_pipe import parse_pipe
|
|
@@ -140,7 +140,7 @@ def dev_cloud(
|
|
|
140
140
|
context.disable_template_security_validation.set(True)
|
|
141
141
|
|
|
142
142
|
def process(filenames: List[str], watch: bool = False):
|
|
143
|
-
datafiles = [f for f in filenames if f.endswith(".datasource"
|
|
143
|
+
datafiles = [f for f in filenames if f.endswith((".datasource", ".pipe"))]
|
|
144
144
|
if len(datafiles) > 0:
|
|
145
145
|
check_filenames(filenames=datafiles)
|
|
146
146
|
folder_playground(
|
|
@@ -51,7 +51,7 @@ def process(
|
|
|
51
51
|
return build_status.error
|
|
52
52
|
else:
|
|
53
53
|
build_status.building = True
|
|
54
|
-
if file_changed and
|
|
54
|
+
if file_changed and file_changed.endswith((FixtureExtension.NDJSON, FixtureExtension.CSV)):
|
|
55
55
|
rebuild_fixture(project, tb_client, file_changed)
|
|
56
56
|
if build_status:
|
|
57
57
|
build_status.building = False
|
|
@@ -61,7 +61,7 @@ def process(
|
|
|
61
61
|
if build_status:
|
|
62
62
|
build_status.building = False
|
|
63
63
|
build_status.error = None
|
|
64
|
-
elif file_changed and
|
|
64
|
+
elif file_changed and file_changed.endswith((".env.local", ".env")):
|
|
65
65
|
if build_status:
|
|
66
66
|
build_status.building = False
|
|
67
67
|
build_status.error = None
|
tinybird/tb/modules/cli.py
CHANGED
|
@@ -302,7 +302,7 @@ def sql(
|
|
|
302
302
|
)
|
|
303
303
|
|
|
304
304
|
query = ""
|
|
305
|
-
for
|
|
305
|
+
for elem in dependencies_graph.to_run.values():
|
|
306
306
|
for _node in elem["nodes"]:
|
|
307
307
|
if _node["params"]["name"].lower() == node.lower():
|
|
308
308
|
query = "".join(_node["sql"])
|
tinybird/tb/modules/common.py
CHANGED
|
@@ -908,7 +908,7 @@ def get_format_from_filename_or_url(filename_or_url: str) -> str:
|
|
|
908
908
|
'csv'
|
|
909
909
|
"""
|
|
910
910
|
filename_or_url = filename_or_url.lower()
|
|
911
|
-
if filename_or_url.endswith("json"
|
|
911
|
+
if filename_or_url.endswith(("json", "ndjson")):
|
|
912
912
|
return "ndjson"
|
|
913
913
|
if filename_or_url.endswith("parquet"):
|
|
914
914
|
return "parquet"
|
|
@@ -916,7 +916,7 @@ def get_format_from_filename_or_url(filename_or_url: str) -> str:
|
|
|
916
916
|
return "csv"
|
|
917
917
|
try:
|
|
918
918
|
parsed = urlparse(filename_or_url)
|
|
919
|
-
if parsed.path.endswith("json"
|
|
919
|
+
if parsed.path.endswith(("json", "ndjson")):
|
|
920
920
|
return "ndjson"
|
|
921
921
|
if parsed.path.endswith("parquet"):
|
|
922
922
|
return "parquet"
|
|
@@ -168,7 +168,7 @@ def diff_command(
|
|
|
168
168
|
sys.stdout.writelines(diff_lines)
|
|
169
169
|
click.echo("")
|
|
170
170
|
|
|
171
|
-
for rfilename
|
|
171
|
+
for rfilename in local_resources.keys():
|
|
172
172
|
if rfilename not in changed:
|
|
173
173
|
for resource in remote_datasources + remote_pipes:
|
|
174
174
|
properties = get_name_version(resource["name"])
|
|
@@ -127,6 +127,13 @@ class CLIMockException(CLIException):
|
|
|
127
127
|
super().__init__(message, "mock_error", **kw_telemetry_event_data)
|
|
128
128
|
|
|
129
129
|
|
|
130
|
+
class CLIAgentException(CLIException):
|
|
131
|
+
"""Exceptions generated by the agent commands"""
|
|
132
|
+
|
|
133
|
+
def __init__(self, message: str, **kw_telemetry_event_data: Any) -> None:
|
|
134
|
+
super().__init__(message, "agent_error", **kw_telemetry_event_data)
|
|
135
|
+
|
|
136
|
+
|
|
130
137
|
class CLILoginException(CLIException):
|
|
131
138
|
"""Exceptions generated by the login commands"""
|
|
132
139
|
|
tinybird/tb/modules/local.py
CHANGED
|
@@ -11,10 +11,10 @@ from typing import Any, Dict, Optional
|
|
|
11
11
|
import boto3
|
|
12
12
|
import click
|
|
13
13
|
import requests
|
|
14
|
-
|
|
15
|
-
import docker
|
|
16
14
|
from docker.client import DockerClient
|
|
17
15
|
from docker.models.containers import Container
|
|
16
|
+
|
|
17
|
+
import docker
|
|
18
18
|
from tinybird.tb.client import AuthNoTokenException, TinyB
|
|
19
19
|
from tinybird.tb.modules.config import CLIConfig
|
|
20
20
|
from tinybird.tb.modules.exceptions import CLILocalException
|
tinybird/tb/modules/shell.py
CHANGED
|
@@ -294,7 +294,7 @@ class Shell:
|
|
|
294
294
|
arg = argline.strip().lower()
|
|
295
295
|
if not arg:
|
|
296
296
|
return
|
|
297
|
-
if arg.startswith("with"
|
|
297
|
+
if arg.startswith(("with", "select")):
|
|
298
298
|
self.run_sql(argline)
|
|
299
299
|
elif len(arg.split()) == 1 and arg in self.project.pipes + self.project.datasources:
|
|
300
300
|
self.run_sql(f"select * from {argline}")
|
|
@@ -1042,7 +1042,7 @@ def get_format_from_filename_or_url(filename_or_url: str) -> str:
|
|
|
1042
1042
|
'csv'
|
|
1043
1043
|
"""
|
|
1044
1044
|
filename_or_url = filename_or_url.lower()
|
|
1045
|
-
if filename_or_url.endswith("json"
|
|
1045
|
+
if filename_or_url.endswith(("json", "ndjson")):
|
|
1046
1046
|
return "ndjson"
|
|
1047
1047
|
if filename_or_url.endswith("parquet"):
|
|
1048
1048
|
return "parquet"
|
|
@@ -1050,7 +1050,7 @@ def get_format_from_filename_or_url(filename_or_url: str) -> str:
|
|
|
1050
1050
|
return "csv"
|
|
1051
1051
|
try:
|
|
1052
1052
|
parsed = urlparse(filename_or_url)
|
|
1053
|
-
if parsed.path.endswith("json"
|
|
1053
|
+
if parsed.path.endswith(("json", "ndjson")):
|
|
1054
1054
|
return "ndjson"
|
|
1055
1055
|
if parsed.path.endswith("parquet"):
|
|
1056
1056
|
return "parquet"
|
tinybird/tornado_template.py
CHANGED
|
@@ -291,7 +291,7 @@ class Template:
|
|
|
291
291
|
whitespace = loader.whitespace
|
|
292
292
|
else:
|
|
293
293
|
# Whitespace defaults by filename.
|
|
294
|
-
if name.endswith(".html"
|
|
294
|
+
if name.endswith((".html", ".js")):
|
|
295
295
|
whitespace = "single"
|
|
296
296
|
else:
|
|
297
297
|
whitespace = "all"
|
|
@@ -1169,7 +1169,7 @@ def check_valid_expr(expr):
|
|
|
1169
1169
|
check_valid_expr(expr.slice.lower)
|
|
1170
1170
|
if expr.slice.upper is not None:
|
|
1171
1171
|
check_valid_expr(expr.slice.upper)
|
|
1172
|
-
elif isinstance(expr.slice, ast.Constant
|
|
1172
|
+
elif isinstance(expr.slice, (ast.Constant, ast.Subscript)):
|
|
1173
1173
|
check_valid_expr(expr.slice)
|
|
1174
1174
|
else:
|
|
1175
1175
|
raise SecurityException(f"Invalid Slice expression: {ast.dump(expr.slice)}")
|
|
@@ -1178,7 +1178,7 @@ def check_valid_expr(expr):
|
|
|
1178
1178
|
check_valid_expr(key)
|
|
1179
1179
|
for value in expr.values:
|
|
1180
1180
|
check_valid_expr(value)
|
|
1181
|
-
elif isinstance(expr, ast.Tuple
|
|
1181
|
+
elif isinstance(expr, (ast.Tuple, ast.List, ast.Set)):
|
|
1182
1182
|
for x in expr.elts:
|
|
1183
1183
|
check_valid_expr(x)
|
|
1184
1184
|
elif isinstance(expr, ast.JoinedStr):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: tinybird
|
|
3
|
-
Version: 0.0.1.
|
|
3
|
+
Version: 0.0.1.dev301
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/forward/commands
|
|
6
6
|
Author: Tinybird
|
|
@@ -13,7 +13,7 @@ Requires-Dist: boto3
|
|
|
13
13
|
Requires-Dist: click<8.2,>=8.1.6
|
|
14
14
|
Requires-Dist: clickhouse-toolset==0.34.dev0
|
|
15
15
|
Requires-Dist: colorama==0.4.6
|
|
16
|
-
Requires-Dist: confluent-kafka==2.8.
|
|
16
|
+
Requires-Dist: confluent-kafka==2.8.2
|
|
17
17
|
Requires-Dist: cryptography~=41.0.0
|
|
18
18
|
Requires-Dist: croniter==1.3.15
|
|
19
19
|
Requires-Dist: docker==7.1.0
|
|
@@ -25,7 +25,7 @@ Requires-Dist: logfire-api==4.2.0
|
|
|
25
25
|
Requires-Dist: pydantic~=2.11.7
|
|
26
26
|
Requires-Dist: pydantic-ai-slim[anthropic]~=0.5.0
|
|
27
27
|
Requires-Dist: pydantic-ai-slim[retries]~=0.5.0
|
|
28
|
-
Requires-Dist: pyperclip==1.
|
|
28
|
+
Requires-Dist: pyperclip==1.9.0
|
|
29
29
|
Requires-Dist: pyyaml<6.1,>=6.0
|
|
30
30
|
Requires-Dist: requests<3,>=2.28.1
|
|
31
31
|
Requires-Dist: shandy-sqlfmt==0.11.1
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
tinybird/connectors.py,sha256=
|
|
1
|
+
tinybird/connectors.py,sha256=TSux0opkG3gbzTTyRIUfNk4RJoLvTIyp42rdsmmIAYg,15083
|
|
2
2
|
tinybird/context.py,sha256=M2jhaNBDOFLlSU2ONDPwO7Coknh2z1PNY-TlNJAkEK0,1343
|
|
3
3
|
tinybird/datatypes.py,sha256=r4WCvspmrXTJHiPjjyOTiZyZl31FO3Ynkwq4LQsYm6E,11059
|
|
4
4
|
tinybird/feedback_manager.py,sha256=XY8d83pRlq-LH7xHMApkaEebfXEWLjDzrGe1prpcTHE,69778
|
|
5
5
|
tinybird/git_settings.py,sha256=Sw_8rGmribEFJ4Z_6idrVytxpFYk7ez8ei0qHULzs3E,3934
|
|
6
6
|
tinybird/prompts.py,sha256=HoDv9TxPiP8v2XoGTWYxP133dK9CEbXVv4XE5IT339c,45483
|
|
7
|
-
tinybird/service_datasources.py,sha256=
|
|
7
|
+
tinybird/service_datasources.py,sha256=y36l2QYLxFEYRBEBuYCKtjkPjGu0P2a8Fz_AjOTTNM4,48914
|
|
8
8
|
tinybird/sql.py,sha256=7pkwQMUVy0CH5zFgLMZyCx1BeaJSQYC05EmOb9vO3Ls,48694
|
|
9
9
|
tinybird/sql_template.py,sha256=rNePArEmx5GemxW6GJAiNnln0NRWncGgFe0EbC8G2f4,102463
|
|
10
10
|
tinybird/sql_template_fmt.py,sha256=KUHdj5rYCYm_rKKdXYSJAE9vIyXUQLB0YSZnUXHeBlY,10196
|
|
11
11
|
tinybird/sql_toolset.py,sha256=Y2_fQrbk5GSNoRncAmRS_snpV61XQbiOy4uYkeF6pr4,19767
|
|
12
12
|
tinybird/syncasync.py,sha256=IPnOx6lMbf9SNddN1eBtssg8vCLHMt76SuZ6YNYm-Yk,27761
|
|
13
|
-
tinybird/tornado_template.py,sha256=
|
|
13
|
+
tinybird/tornado_template.py,sha256=qBZgsNruDeKa7G-lX83XLo4WccecusD4xj1rSVcBGVM,41882
|
|
14
14
|
tinybird/ch_utils/constants.py,sha256=yTNizMzgYNBzUc2EV3moBfdrDIggOe9hiuAgWF7sv2c,4333
|
|
15
15
|
tinybird/ch_utils/engine.py,sha256=4X1B-iuhdW_mxKnX_m3iCsxgP9RPVgR75g7yH1vsJ6A,40851
|
|
16
|
-
tinybird/datafile/common.py,sha256=
|
|
16
|
+
tinybird/datafile/common.py,sha256=r-kfUPH1feXjYCJR-7xNNzRrA8RZ8y47KAjMgkzhaZo,105654
|
|
17
17
|
tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1wnI,556
|
|
18
18
|
tinybird/datafile/parse_connection.py,sha256=tRyn2Rpr1TeWet5BXmMoQgaotbGdYep1qiTak_OqC5E,1825
|
|
19
19
|
tinybird/datafile/parse_datasource.py,sha256=ssW8QeFSgglVFi3sDZj_HgkJiTJ2069v2JgqnH3CkDE,1825
|
|
20
20
|
tinybird/datafile/parse_pipe.py,sha256=8e9LMecSQVWHC4AXf8cdxoQ1nxUR4fTObYxTctO_EXQ,3816
|
|
21
|
-
tinybird/tb/__cli__.py,sha256=
|
|
21
|
+
tinybird/tb/__cli__.py,sha256=O5MC9cmzrDP6k84cWTDY7avcJMRgZjYRkLdaV70DGbI,247
|
|
22
22
|
tinybird/tb/check_pypi.py,sha256=Gp0HkHHDFMSDL6nxKlOY51z7z1Uv-2LRexNTZSHHGmM,552
|
|
23
23
|
tinybird/tb/cli.py,sha256=FdDFEIayjmsZEVsVSSvRiVYn_FHOVg_zWQzchnzfWho,1008
|
|
24
|
-
tinybird/tb/client.py,sha256=
|
|
24
|
+
tinybird/tb/client.py,sha256=Z27O6kXbQ1ZVi_K6qzdUJoS877nt7rqQDRckOycjNmI,53544
|
|
25
25
|
tinybird/tb/config.py,sha256=XIKju3xxpo40oQ48zDtSv0vgUrBZBHSmHJi4SHksjXE,5447
|
|
26
|
-
tinybird/tb/modules/build.py,sha256=
|
|
27
|
-
tinybird/tb/modules/build_common.py,sha256=
|
|
26
|
+
tinybird/tb/modules/build.py,sha256=q3f_CM-_yt7R24VCmQqe4yat1aPdLqmP_hW5WoqdxBg,7907
|
|
27
|
+
tinybird/tb/modules/build_common.py,sha256=aBpumDCZ5FYfBErBa1zGbJMsxdInr68Z21K40W7-DLE,20151
|
|
28
28
|
tinybird/tb/modules/cicd.py,sha256=0KLKccha9IP749QvlXBmzdWv1On3mFwMY4DUcJlBxiE,7326
|
|
29
|
-
tinybird/tb/modules/cli.py,sha256=
|
|
30
|
-
tinybird/tb/modules/common.py,sha256=
|
|
29
|
+
tinybird/tb/modules/cli.py,sha256=kPmGW71difgANCRVzKlbpAwGwldFRH-YryRBejM8ff4,20511
|
|
30
|
+
tinybird/tb/modules/common.py,sha256=1OwsFHjVPDAuxFctzGjXoqhbKzc_jb1HHq96RaPcaeU,83611
|
|
31
31
|
tinybird/tb/modules/config.py,sha256=gK7rgaWTDd4ZKCrNEg_Uemr26EQjqWt6TjyQKujxOws,11462
|
|
32
32
|
tinybird/tb/modules/connection.py,sha256=axp8Fny1_4PSLJGN4UF6WygyRbQtM3Lbt6thxHKTxzw,17790
|
|
33
33
|
tinybird/tb/modules/copy.py,sha256=dPZkcIDvxjJrlQUIvToO0vsEEEs4EYumbNV77-BzNoU,4404
|
|
@@ -38,15 +38,15 @@ tinybird/tb/modules/deployment_common.py,sha256=ZX27oUw7u1ld20qiXH69j7m0DImOc5nc
|
|
|
38
38
|
tinybird/tb/modules/deprecations.py,sha256=rrszC1f_JJeJ8mUxGoCxckQTJFBCR8wREf4XXXN-PRc,4507
|
|
39
39
|
tinybird/tb/modules/dev_server.py,sha256=57FCKuWpErwYUYgHspYDkLWEm9F4pbvVOtMrFXX1fVU,10129
|
|
40
40
|
tinybird/tb/modules/endpoint.py,sha256=ksRj6mfDb9Xv63PhTkV_uKSosgysHElqagg3RTt21Do,11958
|
|
41
|
-
tinybird/tb/modules/exceptions.py,sha256=
|
|
41
|
+
tinybird/tb/modules/exceptions.py,sha256=_1BHy0OixEkeF0fOCu1_1Pj8pJS4BNfUyucqCViJGTw,5958
|
|
42
42
|
tinybird/tb/modules/feedback_manager.py,sha256=duigLI2UIeMzP5IOa7XUty23NRvNssm2ZAKicuun3Pg,78130
|
|
43
43
|
tinybird/tb/modules/info.py,sha256=UKlazKWSE3bzEtggTwyDhmkh7WRrWURuBraR36ClbmQ,7177
|
|
44
44
|
tinybird/tb/modules/infra.py,sha256=JE9oLIyF4bi_JBoe-BgZ5HhKp_lQgSihuSV1KIS02Qs,32709
|
|
45
45
|
tinybird/tb/modules/job.py,sha256=wBsnu8UPTOha2rkLvucgmw4xYv73ubmui3eeSIF68ZM,3107
|
|
46
46
|
tinybird/tb/modules/llm.py,sha256=fPBBCmM3KlCksLlgJkg4joDn6y3H5QjDzE-Pm4YNf7E,1782
|
|
47
47
|
tinybird/tb/modules/llm_utils.py,sha256=nS9r4FAElJw8yXtmdYrx-rtI2zXR8qXfi1QqUDCfxvg,3469
|
|
48
|
-
tinybird/tb/modules/local.py,sha256=
|
|
49
|
-
tinybird/tb/modules/local_common.py,sha256=
|
|
48
|
+
tinybird/tb/modules/local.py,sha256=cez8ZV7Gt9F1siz54dpgtynEw-il3Y9mNcQgEtOVvmw,6512
|
|
49
|
+
tinybird/tb/modules/local_common.py,sha256=KhALzU0L3AC56vqs3peBe-dqGzw5hWkOg_CfS0skohk,18528
|
|
50
50
|
tinybird/tb/modules/login.py,sha256=zerXZqIv15pbFk5XRt746xGcVnp01YmL_403byBf4jQ,1245
|
|
51
51
|
tinybird/tb/modules/login_common.py,sha256=CKXD_BjivhGUmBtNbLTJwzQDr6885C72XPZjo0GLLvI,12010
|
|
52
52
|
tinybird/tb/modules/logout.py,sha256=sniI4JNxpTrVeRCp0oGJuQ3yRerG4hH5uz6oBmjv724,1009
|
|
@@ -59,7 +59,7 @@ tinybird/tb/modules/project.py,sha256=tP6XuG8dR8QCA4pojlXZ7Am6EfS2h3Xnzw5lA3sdtl
|
|
|
59
59
|
tinybird/tb/modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
60
60
|
tinybird/tb/modules/secret.py,sha256=9BIdh2PZDAbY2wRbf4ZDvkEltygztz1RMxgDmY1D0LI,3521
|
|
61
61
|
tinybird/tb/modules/secret_common.py,sha256=8mEXOdNFrTuVWu7rgZ5-C8v-rB1EAdZQUHIyBIgwISI,1578
|
|
62
|
-
tinybird/tb/modules/shell.py,sha256=
|
|
62
|
+
tinybird/tb/modules/shell.py,sha256=ExOAY2SwywCc5D6X-WCbl7tAV73bYWcGAan4E6u02vI,13605
|
|
63
63
|
tinybird/tb/modules/sink.py,sha256=dK2s__my0ePIUYrqBzhPSgdWN9rbpvP1G4dT7DJzz80,3865
|
|
64
64
|
tinybird/tb/modules/table.py,sha256=4XrtjM-N0zfNtxVkbvLDQQazno1EPXnxTyo7llivfXk,11035
|
|
65
65
|
tinybird/tb/modules/telemetry.py,sha256=T9gtsQffWqG_4hRBaUJPzOfMkPwz7mH-R6Bn1XRYViA,11482
|
|
@@ -70,7 +70,7 @@ tinybird/tb/modules/watch.py,sha256=R0wERRyL-PrwxKOLSk-T-EvkIczHpeoGirrl3JZxXa8,
|
|
|
70
70
|
tinybird/tb/modules/workspace.py,sha256=tCP1zZMwBhLRGm22TGfpSd4cHvQLAS1o_azIXv_r6uw,11172
|
|
71
71
|
tinybird/tb/modules/workspace_members.py,sha256=5JdkJgfuEwbq-t6vxkBhYwgsiTDxF790wsa6Xfif9nk,8608
|
|
72
72
|
tinybird/tb/modules/agent/__init__.py,sha256=i3oe3vDIWWPaicdCM0zs7D7BJ1W0k7th93ooskHAV00,54
|
|
73
|
-
tinybird/tb/modules/agent/agent.py,sha256=
|
|
73
|
+
tinybird/tb/modules/agent/agent.py,sha256=R-njI3JNM5_qO5tdXatwV6KGDuyNa93Due9PKkPTShw,39988
|
|
74
74
|
tinybird/tb/modules/agent/animations.py,sha256=4WOC5_2BracttmMCrV0H91tXfWcUzQHBUaIJc5FA7tE,3490
|
|
75
75
|
tinybird/tb/modules/agent/banner.py,sha256=l6cO5Fi7lbVKp-GsBP8jf3IkjOWxg2jpAt9NBCy0WR8,4085
|
|
76
76
|
tinybird/tb/modules/agent/command_agent.py,sha256=0Z08rQsir59zQAr-kkOvsKIFpIBsBSTGJJ1VgqqF5WA,3654
|
|
@@ -82,7 +82,7 @@ tinybird/tb/modules/agent/mock_agent.py,sha256=9_w5-MJDC3vp0U5SkM-ucqhxftfpeUM4F
|
|
|
82
82
|
tinybird/tb/modules/agent/models.py,sha256=eokO8XlY-kVJOsbqiVporGUAOCyKAXCO5xgTEK9SM6Y,2208
|
|
83
83
|
tinybird/tb/modules/agent/prompts.py,sha256=eua-QawthfG5X6Kz1dRzOZSjXU8tj0nr4k7onmvBZnk,45792
|
|
84
84
|
tinybird/tb/modules/agent/testing_agent.py,sha256=AtwtJViH7805i7djyBgDb7SSUtDyJnw0TWJu6lBFsrg,2953
|
|
85
|
-
tinybird/tb/modules/agent/utils.py,sha256=
|
|
85
|
+
tinybird/tb/modules/agent/utils.py,sha256=F4ZuaYPuDCHligFJT_265V8mKyPrsm591DTAzCAIMYk,31998
|
|
86
86
|
tinybird/tb/modules/agent/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
87
87
|
tinybird/tb/modules/agent/tools/analyze.py,sha256=CR5LXg4fou-zYEksqnjpJ0icvxJVoKnTctoI1NRvqCM,3873
|
|
88
88
|
tinybird/tb/modules/agent/tools/append.py,sha256=cF-1XYmgTXI3dfMQ_nEpOKo6duJGe2GOg64rXNnS9gw,8284
|
|
@@ -105,24 +105,24 @@ tinybird/tb/modules/datafile/build.py,sha256=NFKBrusFLU0WJNCXePAFWiEDuTaXpwc0lHl
|
|
|
105
105
|
tinybird/tb/modules/datafile/build_common.py,sha256=2yNdxe49IMA9wNvl25NemY2Iaz8L66snjOdT64dm1is,4511
|
|
106
106
|
tinybird/tb/modules/datafile/build_datasource.py,sha256=Ra8pVQBDafbFRUKlhpgohhTsRyp_ADKZJVG8Gd69idY,17227
|
|
107
107
|
tinybird/tb/modules/datafile/build_pipe.py,sha256=-mpzYcTEdH313R-FEDYuDOtAbZ5zehynzJwmtsfy16w,11262
|
|
108
|
-
tinybird/tb/modules/datafile/diff.py,sha256=
|
|
108
|
+
tinybird/tb/modules/datafile/diff.py,sha256=bwVh15E_lio78QDUFQ4ozAEMF7rfUBm2c77JQkL33ZA,6712
|
|
109
109
|
tinybird/tb/modules/datafile/fixture.py,sha256=gftYWeweeQDFK3cHgUmSOfltNjZVOuMt8v7WTMLhGBw,1579
|
|
110
110
|
tinybird/tb/modules/datafile/format_common.py,sha256=5w6GX_8RDFueW9AtDfWpc1OicEu8wWdrjUBdCEidCQk,1951
|
|
111
111
|
tinybird/tb/modules/datafile/format_datasource.py,sha256=X5N65vDpprFKaWaxkSwFnHaNzYIxVhG1Sya4BARTd2Q,6138
|
|
112
|
-
tinybird/tb/modules/datafile/format_pipe.py,sha256=
|
|
112
|
+
tinybird/tb/modules/datafile/format_pipe.py,sha256=7KDvGDQly7KQv67pO0FS2Xi1vvgX_gt1LmC2qg4gSJ0,7374
|
|
113
113
|
tinybird/tb/modules/datafile/pipe_checker.py,sha256=dxsCQoA6ruxg1fvF6sMLFowpjaqws8lUQcM7XyhgZPE,24609
|
|
114
114
|
tinybird/tb/modules/datafile/playground.py,sha256=47q4XcvDhclHWYv7oFNEqmF1T5NXd9GPWkrT6Av2VhY,56343
|
|
115
115
|
tinybird/tb/modules/datafile/pull.py,sha256=6mn3xqLxb6KQDcnqq63AaPzku9XsSOpscfcdsHyvvsY,5101
|
|
116
116
|
tinybird/tb/modules/tinyunit/tinyunit.py,sha256=sJeBnKDHcUNn8t0sdsKB_M2w8IdzeeQ1PzJuleeQ2-E,11695
|
|
117
117
|
tinybird/tb/modules/tinyunit/tinyunit_lib.py,sha256=hGh1ZaXC1af7rKnX7222urkj0QJMhMWclqMy59dOqwE,1922
|
|
118
118
|
tinybird/tb_cli_modules/cicd.py,sha256=0lMkb6CVOFZl5HOwgY8mK4T4mgI7O8335UngLXtCc-c,13851
|
|
119
|
-
tinybird/tb_cli_modules/common.py,sha256=
|
|
119
|
+
tinybird/tb_cli_modules/common.py,sha256=VQQjGmbbKR09TWn1lxd_ip4uykqaBcY6UoXB2MlWvgQ,82985
|
|
120
120
|
tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4ewgA,11546
|
|
121
121
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
122
122
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
123
123
|
tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
|
|
124
|
-
tinybird-0.0.1.
|
|
125
|
-
tinybird-0.0.1.
|
|
126
|
-
tinybird-0.0.1.
|
|
127
|
-
tinybird-0.0.1.
|
|
128
|
-
tinybird-0.0.1.
|
|
124
|
+
tinybird-0.0.1.dev301.dist-info/METADATA,sha256=N4Ot_u5Ky4TsdsOj9LEFHpqY1i3VnaDBicMwZT306dA,1845
|
|
125
|
+
tinybird-0.0.1.dev301.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
126
|
+
tinybird-0.0.1.dev301.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
127
|
+
tinybird-0.0.1.dev301.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
128
|
+
tinybird-0.0.1.dev301.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|