tinybird-cli 3.9.1.dev4__py3-none-any.whl → 3.9.1.dev5__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.
tinybird/__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__ = '3.9.1.dev4'
8
- __revision__ = '6fbd338'
7
+ __version__ = '3.9.1.dev5'
8
+ __revision__ = 'af5d9ca'
tinybird/datafile.py CHANGED
@@ -2943,20 +2943,18 @@ async def new_ds(
2943
2943
  for tk in ds["tokens"]:
2944
2944
  token_name = tk["token_name"]
2945
2945
  t = await client.get_token_by_name(token_name)
2946
- if t:
2947
- break
2948
- if not t:
2949
- token_name = tk["token_name"]
2950
- click.echo(FeedbackManager.info_create_not_found_token(token=token_name))
2951
- # DS == token_origin.Origins.DATASOURCE
2952
- await client.create_token(token_name, f"DATASOURCES:{tk['permissions']}:{ds_name}", "DS", ds_name)
2953
- else:
2954
- click.echo(FeedbackManager.info_create_found_token(token=token_name))
2955
- scopes = [f"DATASOURCES:{tk['permissions']}:{ds_name}"]
2956
- for x in t["scopes"]:
2957
- sc = x["type"] if "resource" not in x else f"{x['type']}:{x['resource']}"
2958
- scopes.append(sc)
2959
- await client.alter_tokens(token_name, scopes)
2946
+ if not t:
2947
+ token_name = tk["token_name"]
2948
+ click.echo(FeedbackManager.info_create_not_found_token(token=token_name))
2949
+ # DS == token_origin.Origins.DATASOURCE
2950
+ await client.create_token(token_name, f"DATASOURCES:{tk['permissions']}:{ds_name}", "DS", ds_name)
2951
+ else:
2952
+ click.echo(FeedbackManager.info_create_found_token(token=token_name))
2953
+ scopes = [f"DATASOURCES:{tk['permissions']}:{ds_name}"]
2954
+ for x in t["scopes"]:
2955
+ sc = x["type"] if "resource" not in x else f"{x['type']}:{x['resource']}"
2956
+ scopes.append(sc)
2957
+ await client.alter_tokens(token_name, scopes)
2960
2958
 
2961
2959
  try:
2962
2960
  existing_ds = await client.get_datasource(ds_name)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinybird-cli
3
- Version: 3.9.1.dev4
3
+ Version: 3.9.1.dev5
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -51,6 +51,11 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
51
51
  Changelog
52
52
  ----------
53
53
 
54
+ 3.9.1.dev5
55
+ ************
56
+
57
+ - `Added` support for adding multiple tokens when pushing a `.datasource` file
58
+
54
59
 
55
60
  3.9.1.dev4
56
61
  ************
@@ -1,10 +1,10 @@
1
- tinybird/__cli__.py,sha256=k79JQ_iAFXk9PG8us7DVlIqfa3URwgmNhI2vSZnCm1E,254
1
+ tinybird/__cli__.py,sha256=BHuuX10VpHOTG3Md_FabeUg9BXcU0uF_ewuDX10-H1I,254
2
2
  tinybird/check_pypi.py,sha256=_4NkharLyR_ELrAdit-ftqIWvOf7jZNPt3i76frlo9g,975
3
3
  tinybird/client.py,sha256=bwcjq8RQDZvrrcKdkp0B72w2_AGMEo1rSUBvtF1udes,46735
4
4
  tinybird/config.py,sha256=E0jDwbFD1zhdijNhtF8fg6mqIyKbZ8xpNPP_3n2PFpE,2003
5
5
  tinybird/connectors.py,sha256=lkpVSUmSuViEZBa4QjTK7YmPHUop0a5UFoTrSmlVq6k,15244
6
6
  tinybird/context.py,sha256=-abzcFxtsoPtUHbtsgdIaUZSUtS1At8_3gepjlO-GLQ,845
7
- tinybird/datafile.py,sha256=L_WeRYoy11HFERcS8VCkJDFmCXWZh1RFrmdeQKpDmdE,212510
7
+ tinybird/datafile.py,sha256=druOmDFld2aciEstr5T5rHBYER3j0_Dbf5y1BfSkEXU,212518
8
8
  tinybird/datatypes.py,sha256=adYOQBTyfeBGVINIlaRex_81gTQQuqF2M9VTQpzq1H0,7060
9
9
  tinybird/feedback_manager.py,sha256=MDgfmdoouQ7HfF-JX20796fDJv5y_sIAGqBsnqBcfaQ,59638
10
10
  tinybird/git_settings.py,sha256=vu8sWb3TAXeM8Tqy27aR0el8MnPm7kqQzTRV76xB0ro,4707
@@ -36,8 +36,8 @@ tinybird/tb_cli_modules/workspace.py,sha256=NDHINzW3SBo8FcWH8Bx-DCeUXQ8YUJX6FW8c
36
36
  tinybird/tb_cli_modules/workspace_members.py,sha256=3HzY43218fb35ZM81mtkwDQe7gAAf1zEFY6kIEhGvgE,8268
37
37
  tinybird/tb_cli_modules/tinyunit/tinyunit.py,sha256=0dYYmZMMJVubxSPls2e_a-fqtUYvgLfu2B0xwLfkbHw,11667
38
38
  tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py,sha256=j92za8QbXrv4eIPjKBZPn9ghR-nYQ2wZZ88MeXyMWXE,1868
39
- tinybird_cli-3.9.1.dev4.dist-info/METADATA,sha256=3XoKqNMbNI93Q1R4hds2gHLVXlWYzSqwfjZ75GLn08s,70269
40
- tinybird_cli-3.9.1.dev4.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
41
- tinybird_cli-3.9.1.dev4.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
42
- tinybird_cli-3.9.1.dev4.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
43
- tinybird_cli-3.9.1.dev4.dist-info/RECORD,,
39
+ tinybird_cli-3.9.1.dev5.dist-info/METADATA,sha256=1WpZACVSRX6aNeU_ZrD3QCyQAEWCjCcmo4hmtntqjJE,70374
40
+ tinybird_cli-3.9.1.dev5.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
41
+ tinybird_cli-3.9.1.dev5.dist-info/entry_points.txt,sha256=PKPKuPmA4IfJYnCFHHUiw-aAWZuBomFvwCklv1OyCjE,43
42
+ tinybird_cli-3.9.1.dev5.dist-info/top_level.txt,sha256=pgw6AzERHBcW3YTi2PW4arjxLkulk2msOz_SomfOEuc,45
43
+ tinybird_cli-3.9.1.dev5.dist-info/RECORD,,