tinybird 0.0.1.dev297__py3-none-any.whl → 0.0.1.dev299__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/config.py +6 -6
- tinybird/tb/modules/agent/agent.py +9 -9
- {tinybird-0.0.1.dev297.dist-info → tinybird-0.0.1.dev299.dist-info}/METADATA +1 -1
- {tinybird-0.0.1.dev297.dist-info → tinybird-0.0.1.dev299.dist-info}/RECORD +8 -8
- {tinybird-0.0.1.dev297.dist-info → tinybird-0.0.1.dev299.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev297.dist-info → tinybird-0.0.1.dev299.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev297.dist-info → tinybird-0.0.1.dev299.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.dev299'
|
|
8
|
+
__revision__ = '7e8ff36'
|
tinybird/tb/config.py
CHANGED
|
@@ -41,17 +41,17 @@ CLOUD_HOSTS = {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
CH_HOSTS = {
|
|
44
|
-
"https://api.tinybird.co": "https://clickhouse.
|
|
45
|
-
"https://api.us-east.tinybird.co": "https://clickhouse.us-
|
|
44
|
+
"https://api.tinybird.co": "https://clickhouse.tinybird.co",
|
|
45
|
+
"https://api.us-east.tinybird.co": "https://clickhouse.us-east.tinybird.co",
|
|
46
46
|
"https://api.us-east.aws.tinybird.co": "https://clickhouse.us-east-1.aws.tinybird.co",
|
|
47
47
|
"https://api.us-west-2.aws.tinybird.co": "https://clickhouse.us-west-2.aws.tinybird.co",
|
|
48
48
|
"https://api.eu-central-1.aws.tinybird.co": "https://clickhouse.eu-central-1.aws.tinybird.co",
|
|
49
49
|
"https://api.eu-west-1.aws.tinybird.co": "https://clickhouse.eu-west-1.aws.tinybird.co",
|
|
50
50
|
"https://api.europe-west2.gcp.tinybird.co": "https://clickhouse.europe-west2.gcp.tinybird.co",
|
|
51
51
|
"https://api.ap-east.aws.tinybird.co": "https://clickhouse.ap-east.aws.tinybird.co",
|
|
52
|
-
"https://ui.tinybird.co": "https://clickhouse.
|
|
53
|
-
"https://ui.us-east.tinybird.co": "https://clickhouse.us-
|
|
54
|
-
"https://ui.us-east.aws.tinybird.co": "https://clickhouse.us-east
|
|
52
|
+
"https://ui.tinybird.co": "https://clickhouse.tinybird.co",
|
|
53
|
+
"https://ui.us-east.tinybird.co": "https://clickhouse.us-east.tinybird.co",
|
|
54
|
+
"https://ui.us-east.aws.tinybird.co": "https://clickhouse.us-east.aws.tinybird.co",
|
|
55
55
|
"https://ui.us-west-2.aws.tinybird.co": "https://clickhouse.us-west-2.aws.tinybird.co",
|
|
56
56
|
"https://ui.eu-central-1.aws.tinybird.co": "https://clickhouse.eu-central-1.aws.tinybird.co",
|
|
57
57
|
"https://ui.europe-west2.gcp.tinybird.co": "https://clickhouse.europe-west2.gcp.tinybird.co",
|
|
@@ -106,7 +106,7 @@ def get_clickhouse_host(api_host: str) -> str:
|
|
|
106
106
|
is_local = "localhost" in api_host
|
|
107
107
|
if is_local:
|
|
108
108
|
return "http://localhost:7182"
|
|
109
|
-
return f"{CH_HOSTS.get(api_host, api_host)}:443"
|
|
109
|
+
return f"{CH_HOSTS.get(api_host, api_host.replace('api.', 'clickhouse.'))}:443"
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
class FeatureFlags:
|
|
@@ -463,18 +463,18 @@ class TinybirdAgent:
|
|
|
463
463
|
workspace_id = config.get("id", "")
|
|
464
464
|
workspace = client.workspace(workspace_id, with_organization=True, version="v1")
|
|
465
465
|
limits_data = client.organization_limits(workspace["organization"]["id"])
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
remaining_credits = round(max(
|
|
470
|
-
|
|
471
|
-
if not
|
|
466
|
+
llm_usage_limits = limits_data.get("limits", {}).get("llm_usage", {})
|
|
467
|
+
current_llm_usage = llm_usage_limits.get("quantity") or 0
|
|
468
|
+
llm_usage = llm_usage_limits.get("max") or 0
|
|
469
|
+
remaining_credits = round(max(llm_usage - current_llm_usage, 0), 2)
|
|
470
|
+
current_llm_usage = round(min(llm_usage, current_llm_usage), 2)
|
|
471
|
+
if not llm_usage:
|
|
472
472
|
return
|
|
473
|
-
warning_threshold =
|
|
474
|
-
message_color = FeedbackManager.warning if
|
|
473
|
+
warning_threshold = llm_usage * 0.8
|
|
474
|
+
message_color = FeedbackManager.warning if current_llm_usage >= warning_threshold else FeedbackManager.gray
|
|
475
475
|
click.echo(
|
|
476
476
|
message_color(
|
|
477
|
-
message=f"{remaining_credits} credits left ({
|
|
477
|
+
message=f"{remaining_credits} credits left ({current_llm_usage}/{llm_usage}). You can continue using Tinybird Code. Limits will be enforced soon."
|
|
478
478
|
)
|
|
479
479
|
)
|
|
480
480
|
except Exception:
|
|
@@ -18,11 +18,11 @@ tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1w
|
|
|
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=9xQZS6K0YDCjiorgU1hjPlnG_m1PzNU9a3uRw5TdU1A,247
|
|
22
22
|
tinybird/tb/check_pypi.py,sha256=Gp0HkHHDFMSDL6nxKlOY51z7z1Uv-2LRexNTZSHHGmM,552
|
|
23
23
|
tinybird/tb/cli.py,sha256=FdDFEIayjmsZEVsVSSvRiVYn_FHOVg_zWQzchnzfWho,1008
|
|
24
24
|
tinybird/tb/client.py,sha256=IQRaInDjOwr9Fzaz3_xXc3aUGqh94tM2lew7IZbB9eM,53733
|
|
25
|
-
tinybird/tb/config.py,sha256=
|
|
25
|
+
tinybird/tb/config.py,sha256=XIKju3xxpo40oQ48zDtSv0vgUrBZBHSmHJi4SHksjXE,5447
|
|
26
26
|
tinybird/tb/modules/build.py,sha256=vyhQyyDGLUHrJGdKoRy0gCc62vzZrRjtyzdXAJttYE4,7925
|
|
27
27
|
tinybird/tb/modules/build_common.py,sha256=w6UUXfr73EKjTCBqKgZxciMoL8HVwpg37gL4GXYKycw,20201
|
|
28
28
|
tinybird/tb/modules/cicd.py,sha256=0KLKccha9IP749QvlXBmzdWv1On3mFwMY4DUcJlBxiE,7326
|
|
@@ -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=cjz_fVOGNscOy2JztRmOWkFAn05V4jThM4qEsPvhKFs,38563
|
|
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
|
|
@@ -121,8 +121,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
|
|
|
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.dev299.dist-info/METADATA,sha256=jyFm0Dv3xSAaUqQjb4IyV9Yj2V4rjxYOL-Wqo5MAsa8,1845
|
|
125
|
+
tinybird-0.0.1.dev299.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
126
|
+
tinybird-0.0.1.dev299.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
127
|
+
tinybird-0.0.1.dev299.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
128
|
+
tinybird-0.0.1.dev299.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|