tinybird 0.0.1.dev102__py3-none-any.whl → 0.0.1.dev103__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/feedback_manager.py +6 -0
- tinybird/tb/__cli__.py +2 -2
- tinybird/tb/modules/cicd.py +1 -1
- tinybird/tb/modules/cli.py +0 -41
- tinybird/tb/modules/common.py +51 -3
- tinybird/tb/modules/create.py +2 -2
- tinybird/tb/modules/datafile/common.py +2 -0
- tinybird/tb/modules/infra.py +463 -226
- tinybird/tb/modules/local.py +30 -0
- tinybird/tb/modules/workspace.py +4 -25
- {tinybird-0.0.1.dev102.dist-info → tinybird-0.0.1.dev103.dist-info}/METADATA +2 -19
- {tinybird-0.0.1.dev102.dist-info → tinybird-0.0.1.dev103.dist-info}/RECORD +15 -15
- {tinybird-0.0.1.dev102.dist-info → tinybird-0.0.1.dev103.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev102.dist-info → tinybird-0.0.1.dev103.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev102.dist-info → tinybird-0.0.1.dev103.dist-info}/top_level.txt +0 -0
tinybird/tb/modules/local.py
CHANGED
|
@@ -3,6 +3,7 @@ import re
|
|
|
3
3
|
import subprocess
|
|
4
4
|
import time
|
|
5
5
|
|
|
6
|
+
import boto3
|
|
6
7
|
import click
|
|
7
8
|
|
|
8
9
|
import docker
|
|
@@ -51,6 +52,8 @@ def start_tinybird_local(
|
|
|
51
52
|
if container:
|
|
52
53
|
container.remove(force=True)
|
|
53
54
|
|
|
55
|
+
environment = get_local_aws_credentials()
|
|
56
|
+
|
|
54
57
|
container = docker_client.containers.run(
|
|
55
58
|
TB_IMAGE_NAME,
|
|
56
59
|
name=TB_CONTAINER_NAME,
|
|
@@ -58,6 +61,7 @@ def start_tinybird_local(
|
|
|
58
61
|
ports={"80/tcp": TB_LOCAL_PORT},
|
|
59
62
|
remove=False,
|
|
60
63
|
platform="linux/amd64",
|
|
64
|
+
environment=environment,
|
|
61
65
|
)
|
|
62
66
|
|
|
63
67
|
click.echo(FeedbackManager.info(message="* Waiting for Tinybird Local to be ready..."))
|
|
@@ -89,6 +93,32 @@ def get_docker_client():
|
|
|
89
93
|
)
|
|
90
94
|
|
|
91
95
|
|
|
96
|
+
def get_local_aws_credentials():
|
|
97
|
+
credentials: dict[str, str] = {}
|
|
98
|
+
try:
|
|
99
|
+
# Get the boto3 session and credentials
|
|
100
|
+
session = boto3.Session()
|
|
101
|
+
creds = session.get_credentials()
|
|
102
|
+
|
|
103
|
+
if creds:
|
|
104
|
+
# Create environment variables for the container based on boto credentials
|
|
105
|
+
credentials["AWS_ACCESS_KEY_ID"] = creds.access_key
|
|
106
|
+
credentials["AWS_SECRET_ACCESS_KEY"] = creds.secret_key
|
|
107
|
+
|
|
108
|
+
# Add session token if it exists (for temporary credentials)
|
|
109
|
+
if creds.token:
|
|
110
|
+
credentials["AWS_SESSION_TOKEN"] = creds.token
|
|
111
|
+
|
|
112
|
+
# Add region if available
|
|
113
|
+
if session.region_name:
|
|
114
|
+
credentials["AWS_DEFAULT_REGION"] = session.region_name
|
|
115
|
+
except Exception:
|
|
116
|
+
# TODO (rbarbadillo): We should handle this better. If users don't have AWS credentials, most times it's fine
|
|
117
|
+
# but if they want to use S3, they'll need a warning.
|
|
118
|
+
pass
|
|
119
|
+
return credentials
|
|
120
|
+
|
|
121
|
+
|
|
92
122
|
def stop_tinybird_local(docker_client):
|
|
93
123
|
"""Stop the Tinybird container."""
|
|
94
124
|
try:
|
tinybird/tb/modules/workspace.py
CHANGED
|
@@ -12,10 +12,8 @@ from tinybird.client import TinyB
|
|
|
12
12
|
from tinybird.tb.modules.cli import cli
|
|
13
13
|
from tinybird.tb.modules.common import (
|
|
14
14
|
_get_workspace_plan_name,
|
|
15
|
-
|
|
16
|
-
ask_for_organization_name,
|
|
15
|
+
ask_for_organization,
|
|
17
16
|
coro,
|
|
18
|
-
create_organization_and_add_workspaces,
|
|
19
17
|
create_workspace_interactive,
|
|
20
18
|
create_workspace_non_interactive,
|
|
21
19
|
echo_safe_humanfriendly_tables_format_smart_table,
|
|
@@ -24,7 +22,6 @@ from tinybird.tb.modules.common import (
|
|
|
24
22
|
get_user_token,
|
|
25
23
|
is_valid_starterkit,
|
|
26
24
|
print_current_workspace,
|
|
27
|
-
sort_organizations_by_user,
|
|
28
25
|
switch_workspace,
|
|
29
26
|
)
|
|
30
27
|
from tinybird.tb.modules.config import CLIConfig
|
|
@@ -128,27 +125,9 @@ async def create_workspace(
|
|
|
128
125
|
organization_name = None
|
|
129
126
|
organizations = await get_organizations_by_user(config, user_token)
|
|
130
127
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
raise CLIWorkspaceException(FeedbackManager.error_organization_not_found(organization_id=organization_id))
|
|
135
|
-
organization_name = organization.get("name")
|
|
136
|
-
else:
|
|
137
|
-
if len(organizations) == 0:
|
|
138
|
-
organization_name = await ask_for_organization_name(config)
|
|
139
|
-
organization = await create_organization_and_add_workspaces(config, organization_name, user_token)
|
|
140
|
-
organization_id = organization.get("id")
|
|
141
|
-
elif len(organizations) == 1:
|
|
142
|
-
organization_id = organizations[0].get("id")
|
|
143
|
-
organization_name = organizations[0].get("name")
|
|
144
|
-
else:
|
|
145
|
-
sorted_organizations = sort_organizations_by_user(organizations, user_email=config.get_user_email())
|
|
146
|
-
current_organization = await ask_for_organization_interactively(sorted_organizations)
|
|
147
|
-
if current_organization:
|
|
148
|
-
organization_id = current_organization.get("id")
|
|
149
|
-
organization_name = current_organization.get("name")
|
|
150
|
-
else:
|
|
151
|
-
return
|
|
128
|
+
organization_id, organization_name = await ask_for_organization(organizations, organization_id)
|
|
129
|
+
if not organization_id:
|
|
130
|
+
return
|
|
152
131
|
|
|
153
132
|
# If we have at least workspace_name, we start the non interactive
|
|
154
133
|
# process, creating an empty workspace
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: tinybird
|
|
3
|
-
Version: 0.0.1.
|
|
3
|
+
Version: 0.0.1.dev103
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/cli/introduction.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -9,6 +9,7 @@ Requires-Python: >=3.9, <3.14
|
|
|
9
9
|
Description-Content-Type: text/x-rst
|
|
10
10
|
Requires-Dist: aiofiles==24.1.0
|
|
11
11
|
Requires-Dist: anthropic==0.42.0
|
|
12
|
+
Requires-Dist: boto3
|
|
12
13
|
Requires-Dist: click<8.2,>=8.1.6
|
|
13
14
|
Requires-Dist: clickhouse-toolset==0.34.dev0
|
|
14
15
|
Requires-Dist: colorama==0.4.6
|
|
@@ -32,29 +33,11 @@ Requires-Dist: wheel
|
|
|
32
33
|
Requires-Dist: packaging<24,>=23.1
|
|
33
34
|
Requires-Dist: llm>=0.19
|
|
34
35
|
Requires-Dist: thefuzz==0.22.1
|
|
35
|
-
Provides-Extra: bigquery
|
|
36
|
-
Requires-Dist: gsutil==4.58; extra == "bigquery"
|
|
37
|
-
Requires-Dist: google-api-python-client==2.0.2; extra == "bigquery"
|
|
38
|
-
Requires-Dist: google-auth==1.27.1; extra == "bigquery"
|
|
39
|
-
Requires-Dist: google-auth-httplib2==0.1.0; extra == "bigquery"
|
|
40
|
-
Requires-Dist: google-cloud-storage==2.4.0; extra == "bigquery"
|
|
41
|
-
Requires-Dist: google-cloud-bigquery==2.11.0; extra == "bigquery"
|
|
42
|
-
Provides-Extra: snowflake
|
|
43
|
-
Requires-Dist: snowflake-connector-python~=3.12.3; extra == "snowflake"
|
|
44
|
-
Requires-Dist: gsutil==4.58; extra == "snowflake"
|
|
45
|
-
Requires-Dist: google-api-python-client==2.0.2; extra == "snowflake"
|
|
46
|
-
Requires-Dist: google-auth==1.27.1; extra == "snowflake"
|
|
47
|
-
Requires-Dist: google-auth-httplib2==0.1.0; extra == "snowflake"
|
|
48
|
-
Requires-Dist: google-cloud-storage==2.4.0; extra == "snowflake"
|
|
49
|
-
Requires-Dist: oauth2client==3.0.0; extra == "snowflake"
|
|
50
|
-
Requires-Dist: chardet<4,>=3.0.2; extra == "snowflake"
|
|
51
|
-
Requires-Dist: pyOpenSSL<20.0.0,>=16.2.0; extra == "snowflake"
|
|
52
36
|
Dynamic: author
|
|
53
37
|
Dynamic: author-email
|
|
54
38
|
Dynamic: description
|
|
55
39
|
Dynamic: description-content-type
|
|
56
40
|
Dynamic: home-page
|
|
57
|
-
Dynamic: provides-extra
|
|
58
41
|
Dynamic: requires-dist
|
|
59
42
|
Dynamic: requires-python
|
|
60
43
|
Dynamic: summary
|
|
@@ -4,7 +4,7 @@ tinybird/config.py,sha256=5UP_UZ2Qtlm5aOH5W7SbtN8r7X-8u3-r853joKqU5zs,6072
|
|
|
4
4
|
tinybird/connectors.py,sha256=7Gjms7b5MAaBFGi3xytsJurCylprONpFcYrzp4Fw2Rc,15241
|
|
5
5
|
tinybird/context.py,sha256=FfqYfrGX_I7PKGTQo93utaKPDNVYWelg4Hsp3evX5wM,1291
|
|
6
6
|
tinybird/datatypes.py,sha256=XNypumfqNjsvLJ5iNXnbVHRvAJe0aQwI3lS6Cxox-e0,10979
|
|
7
|
-
tinybird/feedback_manager.py,sha256=
|
|
7
|
+
tinybird/feedback_manager.py,sha256=a_ZhFX2zcB7vRknIcmHKMdQbb0c7TqlTBQ_5hPuWh88,69267
|
|
8
8
|
tinybird/git_settings.py,sha256=Sw_8rGmribEFJ4Z_6idrVytxpFYk7ez8ei0qHULzs3E,3934
|
|
9
9
|
tinybird/prompts.py,sha256=RgV1B7-b6-1xXStNlhKikYSCG1WNaddDVeSp8hSgBlE,33753
|
|
10
10
|
tinybird/sql.py,sha256=J35bhdpuu84HW2tiLp-cs_nzkRwPhiy1yPcFhcWMCR4,46248
|
|
@@ -15,28 +15,28 @@ 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=
|
|
18
|
+
tinybird/tb/__cli__.py,sha256=tRfbprNM4lcNzOdUF9bZBJUiPalFJgLPA5lSLBIJUYQ,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
|
|
22
|
-
tinybird/tb/modules/cicd.py,sha256=
|
|
23
|
-
tinybird/tb/modules/cli.py,sha256=
|
|
24
|
-
tinybird/tb/modules/common.py,sha256=
|
|
22
|
+
tinybird/tb/modules/cicd.py,sha256=cCq2NaW_YYlODoJLQGJE1cPNrHGgOqRP6Jkq554h3f8,5679
|
|
23
|
+
tinybird/tb/modules/cli.py,sha256=XtdwMI5uPoKfhlpSuCuhzODRJfTCx1oXHz_bn3x1OBg,16047
|
|
24
|
+
tinybird/tb/modules/common.py,sha256=e5g4hAELeb2QdIxrn9lJEtBQUV96peHKhNKptVEKBbg,83198
|
|
25
25
|
tinybird/tb/modules/config.py,sha256=FqdLpLaKpYubqw3xkB4EX06ufZYDgGRxONR_9i-y-KE,11416
|
|
26
26
|
tinybird/tb/modules/connection.py,sha256=WKeDxbTpSsQ1PUmsT730g3S5RT2PtR5mPpVEanD1nbM,3933
|
|
27
27
|
tinybird/tb/modules/copy.py,sha256=MAVqKip8_QhOYq99U_XuqSO6hCLJEh5sFtbhcXtI3SI,5802
|
|
28
|
-
tinybird/tb/modules/create.py,sha256=
|
|
28
|
+
tinybird/tb/modules/create.py,sha256=FuJYuFqWy2kgSfxSwkQ5nExZgEYALyq_z9dc1d-FRN0,14078
|
|
29
29
|
tinybird/tb/modules/datasource.py,sha256=dNCK9iCR2xPLfwqqwg2ixyE6NuoVEiJU2mBZBmOYrVY,16906
|
|
30
30
|
tinybird/tb/modules/deployment.py,sha256=KMpIahNGUdea3KcH0jTMEnzQ-7zg7M4esd2zTfvaC-k,19337
|
|
31
31
|
tinybird/tb/modules/endpoint.py,sha256=EhVoGAXsFz-83Fiwj1gI-I73iRRvL49d0W81un7hvPE,12080
|
|
32
32
|
tinybird/tb/modules/exceptions.py,sha256=4A2sSjCEqKUMqpP3WI00zouCWW4uLaghXXLZBSw04mY,3363
|
|
33
33
|
tinybird/tb/modules/feedback_manager.py,sha256=7nNiOx7OMebiheLED1r0d75SbuXCNxyBmF4e20rCBNc,69511
|
|
34
34
|
tinybird/tb/modules/fmt.py,sha256=qpf9APqKTKL2uphNgdbj4OMVyLkAxZn6dn4eHF99L5g,3553
|
|
35
|
-
tinybird/tb/modules/infra.py,sha256=
|
|
35
|
+
tinybird/tb/modules/infra.py,sha256=4grSpfcm0gOHiMCYoIh26jx2mzeEEqgyMX8PetRMAWI,33246
|
|
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=
|
|
39
|
+
tinybird/tb/modules/local.py,sha256=SS13uDtH6xhhE9fseQH5cGtHWw9nsrMF1gD5wkGEVcw,6936
|
|
40
40
|
tinybird/tb/modules/local_common.py,sha256=RN5OEncHdq7ua4AZ--WgKtaFuEsLvIhq_ROHJadRXXA,3188
|
|
41
41
|
tinybird/tb/modules/login.py,sha256=dAaBBn_ZIQRm9BFl6Uw_HgZa2qoLuAO6mBOxob_17ms,6253
|
|
42
42
|
tinybird/tb/modules/logout.py,sha256=ULooy1cDBD02-r7voZmhV7udA0ML5tVuflJyShrh56Y,1022
|
|
@@ -55,13 +55,13 @@ tinybird/tb/modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09
|
|
|
55
55
|
tinybird/tb/modules/test.py,sha256=FUU-drY8mdjNoKsw16O5ZqvYvZqzycrZBEpSwbhGDUE,11456
|
|
56
56
|
tinybird/tb/modules/token.py,sha256=OhqLFpCHVfYeBCxJ0n7n2qoho9E9eGcUfHgL7R1MUVQ,13485
|
|
57
57
|
tinybird/tb/modules/watch.py,sha256=poNJOUNDESDNn80H2dHvE6X6pIu-t9MZFi59_TxVN2U,8822
|
|
58
|
-
tinybird/tb/modules/workspace.py,sha256=
|
|
58
|
+
tinybird/tb/modules/workspace.py,sha256=pk9_6fNxXGM1JPQcjTz7Sj77qn9ML27lGIyYEHPwORE,6611
|
|
59
59
|
tinybird/tb/modules/workspace_members.py,sha256=Vb5XEaKmkfONyfg2MS5EcpwolMvv7GLwFS5m2EuobT8,8726
|
|
60
60
|
tinybird/tb/modules/datafile/build.py,sha256=jhfIJ2xt0N13XsLPe3iMQIyCPApHS13_Df2LfISYtT8,50952
|
|
61
61
|
tinybird/tb/modules/datafile/build_common.py,sha256=rT7VJ5mnQ68R_8US91DAtkusfvjWuG_NObOzNgtN_ko,4562
|
|
62
62
|
tinybird/tb/modules/datafile/build_datasource.py,sha256=CCU3eQ8Rax9RgHHfbAXDRL6rQ49N35h_GDQnGrUUUzA,17379
|
|
63
63
|
tinybird/tb/modules/datafile/build_pipe.py,sha256=w-Wd08gZYAEcak9FdBijVfIU2_Wn_PPdgAZddPpoGTo,11382
|
|
64
|
-
tinybird/tb/modules/datafile/common.py,sha256=
|
|
64
|
+
tinybird/tb/modules/datafile/common.py,sha256=HUuhEQ7lC5pqOxUw0NT76qwKlKjSlVAvaIIaXdgqMss,82327
|
|
65
65
|
tinybird/tb/modules/datafile/diff.py,sha256=-0J7PsBO64T7LOZSkZ4ZFHHCPvT7cKItnJkbz2PkndU,6754
|
|
66
66
|
tinybird/tb/modules/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1wnI,556
|
|
67
67
|
tinybird/tb/modules/datafile/fixture.py,sha256=si-9LB-LdKQSWDtVW82xDrHtFfko5bgBG1cvjqqrcPU,1064
|
|
@@ -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.
|
|
85
|
-
tinybird-0.0.1.
|
|
86
|
-
tinybird-0.0.1.
|
|
87
|
-
tinybird-0.0.1.
|
|
88
|
-
tinybird-0.0.1.
|
|
84
|
+
tinybird-0.0.1.dev103.dist-info/METADATA,sha256=JB1oi-8Up8AsrEXhKLGoR0zXe7_8nTG9tG0UAQ45Wf4,1612
|
|
85
|
+
tinybird-0.0.1.dev103.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
86
|
+
tinybird-0.0.1.dev103.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
87
|
+
tinybird-0.0.1.dev103.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
88
|
+
tinybird-0.0.1.dev103.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|