tinybird 0.0.1.dev304__tar.gz → 0.0.1.dev305__tar.gz
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-0.0.1.dev304 → tinybird-0.0.1.dev305}/PKG-INFO +2 -1
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/sql_template.py +8 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/local.py +53 -3
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/local_common.py +10 -2
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird.egg-info/PKG-INFO +2 -1
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird.egg-info/requires.txt +1 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/setup.cfg +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/datafile/common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/datafile/parse_connection.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/service_datasources.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/client.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/__init__.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/animations.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/banner.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/command_agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/compactor.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/explore_agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/file_agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/memory.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/mock_agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/models.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/prompts.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/testing_agent.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/__init__.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/analyze.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/append.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/build.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/datafile.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/deploy.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/deploy_check.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/diff_resource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/execute_query.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/file.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/get_endpoint_stats.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/get_openapi_definition.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/mock.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/plan.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/request_endpoint.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/run_command.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/secret.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/test.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/utils.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/build_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/deployment_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/login_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/mock_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/secret_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/sink.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/test_common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: tinybird
|
|
3
|
-
Version: 0.0.1.
|
|
3
|
+
Version: 0.0.1.dev305
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/forward/commands
|
|
6
6
|
Author: Tinybird
|
|
@@ -39,6 +39,7 @@ Requires-Dist: packaging<24,>=23.1
|
|
|
39
39
|
Requires-Dist: llm>=0.19
|
|
40
40
|
Requires-Dist: thefuzz==0.22.1
|
|
41
41
|
Requires-Dist: python-dotenv==1.1.0
|
|
42
|
+
Requires-Dist: pyjwt[crypto]==2.9.0
|
|
42
43
|
Dynamic: author
|
|
43
44
|
Dynamic: author-email
|
|
44
45
|
Dynamic: description
|
|
@@ -2385,6 +2385,14 @@ def render_sql_template(
|
|
|
2385
2385
|
documentation="/cli/advanced-templates.html",
|
|
2386
2386
|
)
|
|
2387
2387
|
raise SQLTemplateException(str(e), documentation="/cli/advanced-templates.html")
|
|
2388
|
+
except IndexError as e:
|
|
2389
|
+
# This happens when trying to access string indices on empty strings
|
|
2390
|
+
if "string index out of range" in str(e):
|
|
2391
|
+
raise SQLTemplateException(
|
|
2392
|
+
"String index out of range. Check that string parameters have values before accessing specific characters (e.g., param[0]). Provide default values or add length checks in your template.",
|
|
2393
|
+
documentation="/cli/advanced-templates.html",
|
|
2394
|
+
)
|
|
2395
|
+
raise SQLTemplateException(str(e), documentation="/cli/advanced-templates.html")
|
|
2388
2396
|
except Exception as e:
|
|
2389
2397
|
# errors might vary here, we need to support as much as possible
|
|
2390
2398
|
# https://gitlab.com/tinybird/analytics/-/issues/943
|
|
@@ -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.dev305'
|
|
8
|
+
__revision__ = 'cc453b3'
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import uuid
|
|
1
3
|
from pathlib import Path
|
|
4
|
+
from typing import Any
|
|
2
5
|
|
|
3
6
|
import click
|
|
7
|
+
import jwt
|
|
4
8
|
import requests
|
|
5
9
|
from docker.client import DockerClient
|
|
6
10
|
|
|
7
11
|
from tinybird.tb.modules.cli import cli
|
|
8
|
-
from tinybird.tb.modules.common import update_cli
|
|
12
|
+
from tinybird.tb.modules.common import echo_json, update_cli
|
|
9
13
|
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
10
14
|
from tinybird.tb.modules.local_common import (
|
|
11
15
|
TB_CONTAINER_NAME,
|
|
@@ -125,7 +129,21 @@ def remove() -> None:
|
|
|
125
129
|
is_flag=True,
|
|
126
130
|
help="Skip pulling the latest Tinybird Local image. Use directly your current local image.",
|
|
127
131
|
)
|
|
128
|
-
|
|
132
|
+
@click.option(
|
|
133
|
+
"--user-token",
|
|
134
|
+
default=None,
|
|
135
|
+
envvar="TB_LOCAL_USER_TOKEN",
|
|
136
|
+
help="User token to use for the Tinybird Local container.",
|
|
137
|
+
)
|
|
138
|
+
@click.option(
|
|
139
|
+
"--workspace-token",
|
|
140
|
+
default=None,
|
|
141
|
+
envvar="TB_LOCAL_WORKSPACE_TOKEN",
|
|
142
|
+
help="Workspace token to use for the Tinybird Local container.",
|
|
143
|
+
)
|
|
144
|
+
def start(
|
|
145
|
+
use_aws_creds: bool, volumes_path: str, skip_new_version: bool, user_token: str, workspace_token: str
|
|
146
|
+
) -> None:
|
|
129
147
|
"""Start Tinybird Local"""
|
|
130
148
|
if volumes_path is not None:
|
|
131
149
|
absolute_path = Path(volumes_path).absolute()
|
|
@@ -134,7 +152,7 @@ def start(use_aws_creds: bool, volumes_path: str, skip_new_version: bool) -> Non
|
|
|
134
152
|
|
|
135
153
|
click.echo(FeedbackManager.highlight(message="» Starting Tinybird Local..."))
|
|
136
154
|
docker_client = get_docker_client()
|
|
137
|
-
start_tinybird_local(docker_client, use_aws_creds, volumes_path, skip_new_version)
|
|
155
|
+
start_tinybird_local(docker_client, use_aws_creds, volumes_path, skip_new_version, user_token, workspace_token)
|
|
138
156
|
click.echo(FeedbackManager.success(message="✓ Tinybird Local is ready!"))
|
|
139
157
|
|
|
140
158
|
|
|
@@ -183,3 +201,35 @@ def version() -> None:
|
|
|
183
201
|
"""Show Tinybird Local version"""
|
|
184
202
|
response = requests.get(f"{TB_LOCAL_ADDRESS}/version")
|
|
185
203
|
click.echo(FeedbackManager.success(message=f"✓ Tinybird Local version: {response.text}"))
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
@local.command()
|
|
207
|
+
@click.pass_context
|
|
208
|
+
def generate_tokens(ctx: click.Context) -> None:
|
|
209
|
+
"""Generate static tokens for initializing Tinybird Local"""
|
|
210
|
+
output = ctx.ensure_object(dict).get("output")
|
|
211
|
+
user_id = str(uuid.uuid4())
|
|
212
|
+
workspace_id = str(uuid.uuid4())
|
|
213
|
+
user_token_id = str(uuid.uuid4())
|
|
214
|
+
workspace_token_id = str(uuid.uuid4())
|
|
215
|
+
payload = {"u": user_id, "id": user_token_id, "host": None}
|
|
216
|
+
user_token = generate_token(payload)
|
|
217
|
+
payload = {"u": workspace_id, "id": workspace_token_id, "host": None}
|
|
218
|
+
workspace_token = generate_token(payload)
|
|
219
|
+
|
|
220
|
+
if output == "json":
|
|
221
|
+
echo_json({"workspace_token": workspace_token, "user_token": user_token})
|
|
222
|
+
else:
|
|
223
|
+
click.echo(FeedbackManager.gray(message="Workspace token: ") + FeedbackManager.info(message=workspace_token))
|
|
224
|
+
click.echo(FeedbackManager.gray(message="User token: ") + FeedbackManager.info(message=user_token))
|
|
225
|
+
click.echo(FeedbackManager.success(message="✓ Tinybird Local tokens generated!"))
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def generate_token(payload: dict[str, Any]) -> str:
|
|
229
|
+
algo = jwt.algorithms.get_default_algorithms()["HS256"]
|
|
230
|
+
msg = json.dumps(payload)
|
|
231
|
+
msg_base64 = jwt.utils.base64url_encode(msg.encode())
|
|
232
|
+
sign_key = algo.prepare_key("abcd")
|
|
233
|
+
signature = algo.sign(msg_base64, sign_key)
|
|
234
|
+
token = msg_base64 + b"." + jwt.utils.base64url_encode(signature)
|
|
235
|
+
return "p." + token.decode()
|
|
@@ -234,7 +234,9 @@ def start_tinybird_local(
|
|
|
234
234
|
docker_client: DockerClient,
|
|
235
235
|
use_aws_creds: bool,
|
|
236
236
|
volumes_path: Optional[str] = None,
|
|
237
|
-
skip_new_version: bool =
|
|
237
|
+
skip_new_version: bool = True,
|
|
238
|
+
user_token: Optional[str] = None,
|
|
239
|
+
workspace_token: Optional[str] = None,
|
|
238
240
|
) -> None:
|
|
239
241
|
"""Start the Tinybird container."""
|
|
240
242
|
pull_show_prompt = False
|
|
@@ -261,7 +263,13 @@ def start_tinybird_local(
|
|
|
261
263
|
if pull_required:
|
|
262
264
|
docker_client.images.pull(TB_IMAGE_NAME, platform="linux/amd64")
|
|
263
265
|
|
|
264
|
-
environment =
|
|
266
|
+
environment = {}
|
|
267
|
+
if use_aws_creds:
|
|
268
|
+
environment.update(get_use_aws_creds())
|
|
269
|
+
if user_token:
|
|
270
|
+
environment["TB_LOCAL_USER_TOKEN"] = user_token
|
|
271
|
+
if workspace_token:
|
|
272
|
+
environment["TB_LOCAL_WORKSPACE_TOKEN"] = workspace_token
|
|
265
273
|
|
|
266
274
|
container = get_existing_container_with_matching_env(docker_client, TB_CONTAINER_NAME, environment)
|
|
267
275
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: tinybird
|
|
3
|
-
Version: 0.0.1.
|
|
3
|
+
Version: 0.0.1.dev305
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/forward/commands
|
|
6
6
|
Author: Tinybird
|
|
@@ -39,6 +39,7 @@ Requires-Dist: packaging<24,>=23.1
|
|
|
39
39
|
Requires-Dist: llm>=0.19
|
|
40
40
|
Requires-Dist: thefuzz==0.22.1
|
|
41
41
|
Requires-Dist: python-dotenv==1.1.0
|
|
42
|
+
Requires-Dist: pyjwt[crypto]==2.9.0
|
|
42
43
|
Dynamic: author
|
|
43
44
|
Dynamic: author-email
|
|
44
45
|
Dynamic: description
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/deploy_check.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/diff_resource.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/execute_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/request_endpoint.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/agent/tools/run_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/datafile/pipe_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb/modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev304 → tinybird-0.0.1.dev305}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|