tinybird 0.0.1.dev143__py3-none-any.whl → 0.0.1.dev144__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/cli.py +0 -1
- tinybird/tb/modules/deprecations.py +111 -4
- {tinybird-0.0.1.dev143.dist-info → tinybird-0.0.1.dev144.dist-info}/METADATA +1 -1
- {tinybird-0.0.1.dev143.dist-info → tinybird-0.0.1.dev144.dist-info}/RECORD +8 -9
- tinybird/tb/modules/tag.py +0 -100
- {tinybird-0.0.1.dev143.dist-info → tinybird-0.0.1.dev144.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev143.dist-info → tinybird-0.0.1.dev144.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev143.dist-info → tinybird-0.0.1.dev144.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/cli/introduction.html'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev144'
|
|
8
|
+
__revision__ = 'aaeb0de'
|
tinybird/tb/cli.py
CHANGED
|
@@ -25,7 +25,6 @@ import tinybird.tb.modules.mock
|
|
|
25
25
|
import tinybird.tb.modules.open
|
|
26
26
|
import tinybird.tb.modules.pipe
|
|
27
27
|
import tinybird.tb.modules.secret
|
|
28
|
-
import tinybird.tb.modules.tag
|
|
29
28
|
import tinybird.tb.modules.test
|
|
30
29
|
import tinybird.tb.modules.token
|
|
31
30
|
import tinybird.tb.modules.workspace
|
|
@@ -1,6 +1,93 @@
|
|
|
1
1
|
import click
|
|
2
2
|
|
|
3
3
|
from tinybird.tb.modules.cli import cli
|
|
4
|
+
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@cli.command(
|
|
8
|
+
name="branch",
|
|
9
|
+
context_settings=dict(
|
|
10
|
+
ignore_unknown_options=True,
|
|
11
|
+
),
|
|
12
|
+
)
|
|
13
|
+
@click.argument("args", nargs=-1, type=click.UNPROCESSED)
|
|
14
|
+
def branch(args) -> None:
|
|
15
|
+
"""
|
|
16
|
+
`tb branch` is deprecated. You should rely on your version control system to manage branches.
|
|
17
|
+
"""
|
|
18
|
+
click.echo(FeedbackManager.warning(
|
|
19
|
+
message="This command is deprecated. You should rely on your version control system to manage branches."
|
|
20
|
+
))
|
|
21
|
+
click.echo("You are using Tinybird Forward CLI.\nYou can find more information in the docs at https://www.tinybird.co/docs/forward")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@cli.command(
|
|
25
|
+
name="check",
|
|
26
|
+
context_settings=dict(
|
|
27
|
+
ignore_unknown_options=True,
|
|
28
|
+
),
|
|
29
|
+
)
|
|
30
|
+
@click.argument("args", nargs=-1, type=click.UNPROCESSED)
|
|
31
|
+
def check(args) -> None:
|
|
32
|
+
"""
|
|
33
|
+
`tb check` is deprecated.
|
|
34
|
+
"""
|
|
35
|
+
click.echo(FeedbackManager.warning(
|
|
36
|
+
message="This command is deprecated."
|
|
37
|
+
))
|
|
38
|
+
click.echo("You are using Tinybird Forward CLI.\nYou can find more information in the docs at https://www.tinybird.co/docs/forward")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@cli.command(
|
|
42
|
+
name="diff",
|
|
43
|
+
context_settings=dict(
|
|
44
|
+
ignore_unknown_options=True,
|
|
45
|
+
),
|
|
46
|
+
)
|
|
47
|
+
@click.argument("args", nargs=-1, type=click.UNPROCESSED)
|
|
48
|
+
def diff(args) -> None:
|
|
49
|
+
"""
|
|
50
|
+
`tb diff` is deprecated.
|
|
51
|
+
"""
|
|
52
|
+
click.echo(FeedbackManager.warning(
|
|
53
|
+
message="This command is deprecated."
|
|
54
|
+
))
|
|
55
|
+
click.echo("You are using Tinybird Forward CLI.\nYou can find more information in the docs at https://www.tinybird.co/docs/forward")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@cli.command(
|
|
59
|
+
name="fmt",
|
|
60
|
+
context_settings=dict(
|
|
61
|
+
ignore_unknown_options=True,
|
|
62
|
+
),
|
|
63
|
+
)
|
|
64
|
+
@click.argument("args", nargs=-1, type=click.UNPROCESSED)
|
|
65
|
+
def fmt(args) -> None:
|
|
66
|
+
"""
|
|
67
|
+
`tb fmt` is deprecated.
|
|
68
|
+
"""
|
|
69
|
+
click.echo(FeedbackManager.warning(
|
|
70
|
+
message="This command is deprecated."
|
|
71
|
+
))
|
|
72
|
+
click.echo("You are using Tinybird Forward CLI.\nYou can find more information in the docs at https://www.tinybird.co/docs/forward")
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
@cli.command(
|
|
76
|
+
name="init",
|
|
77
|
+
context_settings=dict(
|
|
78
|
+
ignore_unknown_options=True,
|
|
79
|
+
),
|
|
80
|
+
)
|
|
81
|
+
@click.argument("args", nargs=-1, type=click.UNPROCESSED)
|
|
82
|
+
def init(args) -> None:
|
|
83
|
+
"""
|
|
84
|
+
`tb init` is deprecated. Use `tb create` instead.
|
|
85
|
+
"""
|
|
86
|
+
click.echo(FeedbackManager.warning(
|
|
87
|
+
message="This command is deprecated. Use `tb create` instead."
|
|
88
|
+
))
|
|
89
|
+
click.echo("You are using Tinybird Forward CLI.\nYou can find more information in the docs at https://www.tinybird.co/docs/forward")
|
|
90
|
+
|
|
4
91
|
|
|
5
92
|
|
|
6
93
|
@cli.command(
|
|
@@ -14,7 +101,27 @@ def push(args) -> None:
|
|
|
14
101
|
"""
|
|
15
102
|
`tb push` is deprecated. Use `tb deploy` instead.
|
|
16
103
|
"""
|
|
17
|
-
click.echo(
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
)
|
|
104
|
+
click.echo(FeedbackManager.warning(
|
|
105
|
+
message="This command is deprecated. Use `tb deploy` instead."
|
|
106
|
+
))
|
|
107
|
+
click.echo("You are using Tinybird Forward CLI.\nYou can find more information in the docs at https://www.tinybird.co/docs/forward")
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@cli.command(
|
|
112
|
+
name="tag",
|
|
113
|
+
context_settings=dict(
|
|
114
|
+
ignore_unknown_options=True,
|
|
115
|
+
),
|
|
116
|
+
)
|
|
117
|
+
@click.argument("args", nargs=-1, type=click.UNPROCESSED)
|
|
118
|
+
def tag(args) -> None:
|
|
119
|
+
"""
|
|
120
|
+
`tb tag` is deprecated
|
|
121
|
+
"""
|
|
122
|
+
click.echo(FeedbackManager.warning(
|
|
123
|
+
message="This command is deprecated."
|
|
124
|
+
))
|
|
125
|
+
click.echo("You are using Tinybird Forward CLI.\nYou can find more information in the docs at https://www.tinybird.co/docs/forward")
|
|
126
|
+
|
|
127
|
+
|
|
@@ -12,9 +12,9 @@ tinybird/syncasync.py,sha256=IPnOx6lMbf9SNddN1eBtssg8vCLHMt76SuZ6YNYm-Yk,27761
|
|
|
12
12
|
tinybird/tornado_template.py,sha256=jjNVDMnkYFWXflmT8KU_Ssbo5vR8KQq3EJMk5vYgXRw,41959
|
|
13
13
|
tinybird/ch_utils/constants.py,sha256=aYvg2C_WxYWsnqPdZB1ZFoIr8ZY-XjUXYyHKE9Ansj0,3890
|
|
14
14
|
tinybird/ch_utils/engine.py,sha256=BZuPM7MFS7vaEKK5tOMR2bwSAgJudPrJt27uVEwZmTY,40512
|
|
15
|
-
tinybird/tb/__cli__.py,sha256
|
|
15
|
+
tinybird/tb/__cli__.py,sha256=-PHfFRznzuBvEG3g6AbuDkouqGyBqBQDwhOZsXjDA3c,252
|
|
16
16
|
tinybird/tb/check_pypi.py,sha256=rW4QmDRbtgKdUUwJCnBkVjmTjZSZGN-XgZhx7vMkC0w,1009
|
|
17
|
-
tinybird/tb/cli.py,sha256=
|
|
17
|
+
tinybird/tb/cli.py,sha256=uPV6pvi4aYVfaiGs0DQO-eoi1g9dHlrgvhutkXkdJko,1075
|
|
18
18
|
tinybird/tb/client.py,sha256=aaPKq5C77e72kR7IMv9WrvnvNki8mKMOTi9EsCp0eUc,55962
|
|
19
19
|
tinybird/tb/config.py,sha256=HLMHbJg6BjeGZ2KiJA-BCCVnk8w959xsSaDEEePakZg,3981
|
|
20
20
|
tinybird/tb/modules/auth.py,sha256=_OeYnmTH83lnqCgQEdS6K0bx1KBUeRmZk2M7JnRmWpk,9037
|
|
@@ -28,7 +28,7 @@ tinybird/tb/modules/copy.py,sha256=2Mm4FWKehOG7CoOhiF1m9UZJgJn0W1_cMolqju8ONYg,5
|
|
|
28
28
|
tinybird/tb/modules/create.py,sha256=VMX8b5ukgQm0VDUbBX91TsIsxqQid2UXRwlKekQp3M4,16792
|
|
29
29
|
tinybird/tb/modules/datasource.py,sha256=V314rkpdVxVMjsp5qcSCTqDlmp4Vu--qM07BoWh-aqs,17783
|
|
30
30
|
tinybird/tb/modules/deployment.py,sha256=M3NPFQXIEsDh9-J-pzPLuHF9k4SIZVvgUnHp05KOf-E,20448
|
|
31
|
-
tinybird/tb/modules/deprecations.py,sha256=
|
|
31
|
+
tinybird/tb/modules/deprecations.py,sha256=vDf9RgCM8FoSGrFMJLMdNhfvmtMw5t30W-fsOJq3FzI,3607
|
|
32
32
|
tinybird/tb/modules/endpoint.py,sha256=XySDt3pk66vxOZ0egUfz4bY8bEk3BjOXkv-L0OIJ3sc,12083
|
|
33
33
|
tinybird/tb/modules/exceptions.py,sha256=5jK91w1LPmtqIUfDpHe_Op5OxGz8-p1BPgtLREMIni0,5217
|
|
34
34
|
tinybird/tb/modules/feedback_manager.py,sha256=Ncenxx48-vWJjDLPuuIPOOT_1oaAVjuMLHIfbez7v0U,77652
|
|
@@ -49,7 +49,6 @@ tinybird/tb/modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGM
|
|
|
49
49
|
tinybird/tb/modules/secret.py,sha256=WsqzxxLh9W_jkuHL2JofMXdIJy0lT5WEI-7bQSIDgAc,2921
|
|
50
50
|
tinybird/tb/modules/shell.py,sha256=Zd_4Ak_5tKVX-cw6B4ag36xZeEGHeh-jZpAsIXkoMoE,14116
|
|
51
51
|
tinybird/tb/modules/table.py,sha256=4XrtjM-N0zfNtxVkbvLDQQazno1EPXnxTyo7llivfXk,11035
|
|
52
|
-
tinybird/tb/modules/tag.py,sha256=anPmMUBc-TbFovlpFi8GPkKA18y7Y0GczMsMms5TZsU,3502
|
|
53
52
|
tinybird/tb/modules/telemetry.py,sha256=IHHks8-jnrkyQIY_Y6ZmU8hdVHMGSS0pkSUOgCPcYY8,11346
|
|
54
53
|
tinybird/tb/modules/test.py,sha256=WmPoZBSHBORiM66xp54KxfY3s0YwjFMN_ZTT8xObFO4,12377
|
|
55
54
|
tinybird/tb/modules/token.py,sha256=2fmKwu10_M0pqs6YmJVeILR9ZQB0ejRAET86agASbKM,13488
|
|
@@ -80,8 +79,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
|
|
|
80
79
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
81
80
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
82
81
|
tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
|
|
83
|
-
tinybird-0.0.1.
|
|
84
|
-
tinybird-0.0.1.
|
|
85
|
-
tinybird-0.0.1.
|
|
86
|
-
tinybird-0.0.1.
|
|
87
|
-
tinybird-0.0.1.
|
|
82
|
+
tinybird-0.0.1.dev144.dist-info/METADATA,sha256=h6PqqBI0uIalHK2gTkQ4Bd4vrVZkm18OOiaxiT8TFzM,1612
|
|
83
|
+
tinybird-0.0.1.dev144.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
84
|
+
tinybird-0.0.1.dev144.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
85
|
+
tinybird-0.0.1.dev144.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
86
|
+
tinybird-0.0.1.dev144.dist-info/RECORD,,
|
tinybird/tb/modules/tag.py
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
|
|
3
|
-
import click
|
|
4
|
-
from click import Context
|
|
5
|
-
|
|
6
|
-
from tinybird.tb.modules.cli import cli
|
|
7
|
-
from tinybird.tb.modules.common import coro, echo_safe_humanfriendly_tables_format_smart_table
|
|
8
|
-
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@cli.group(hidden=True)
|
|
12
|
-
@click.pass_context
|
|
13
|
-
def tag(ctx: Context) -> None:
|
|
14
|
-
"""Tag commands"""
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@tag.command(name="ls")
|
|
18
|
-
@click.argument("tag_name", required=False)
|
|
19
|
-
@click.pass_context
|
|
20
|
-
@coro
|
|
21
|
-
async def tag_ls(ctx: Context, tag_name: Optional[str]) -> None:
|
|
22
|
-
"""List all the tags of the current Workspace or the resources associated to a specific tag."""
|
|
23
|
-
|
|
24
|
-
client = ctx.ensure_object(dict)["client"]
|
|
25
|
-
response = await client.get_all_tags()
|
|
26
|
-
|
|
27
|
-
if tag_name:
|
|
28
|
-
the_tag = [tag for tag in response["tags"] if tag["name"] == tag_name]
|
|
29
|
-
|
|
30
|
-
columns = ["name", "id", "type"]
|
|
31
|
-
table = []
|
|
32
|
-
|
|
33
|
-
if len(the_tag) > 0:
|
|
34
|
-
for resource in the_tag[0]["resources"]:
|
|
35
|
-
table.append([resource["name"], resource["id"], resource["type"]])
|
|
36
|
-
|
|
37
|
-
click.echo(FeedbackManager.info_tag_resources(tag_name=tag_name))
|
|
38
|
-
echo_safe_humanfriendly_tables_format_smart_table(table, column_names=columns)
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
columns = ["tag", "resources"]
|
|
42
|
-
table = []
|
|
43
|
-
|
|
44
|
-
for tag in response["tags"]:
|
|
45
|
-
unique_resources = []
|
|
46
|
-
for resource in tag["resources"]:
|
|
47
|
-
if resource.get("name", "") not in unique_resources:
|
|
48
|
-
unique_resources.append(resource) # Reducing by name in case there are duplicates.
|
|
49
|
-
table.append([tag["name"], len(unique_resources)])
|
|
50
|
-
|
|
51
|
-
click.echo(FeedbackManager.info_tag_list())
|
|
52
|
-
echo_safe_humanfriendly_tables_format_smart_table(table, column_names=columns)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
@tag.command(name="create")
|
|
56
|
-
@click.argument("tag_name")
|
|
57
|
-
@click.pass_context
|
|
58
|
-
@coro
|
|
59
|
-
async def tag_create(ctx: Context, tag_name: str) -> None:
|
|
60
|
-
"""Create a tag in the current Workspace."""
|
|
61
|
-
|
|
62
|
-
client = ctx.ensure_object(dict)["client"]
|
|
63
|
-
await client.create_tag(name=tag_name)
|
|
64
|
-
|
|
65
|
-
click.echo(FeedbackManager.success_tag_created(tag_name=tag_name))
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
@tag.command(name="rm")
|
|
69
|
-
@click.argument("tag_name")
|
|
70
|
-
@click.option("--yes", is_flag=True, default=False, help="Do not ask for confirmation to delete the tag.")
|
|
71
|
-
@click.pass_context
|
|
72
|
-
@coro
|
|
73
|
-
async def tag_rm(ctx: Context, tag_name: str, yes: bool) -> None:
|
|
74
|
-
"""Remove a tag from the current Workspace."""
|
|
75
|
-
|
|
76
|
-
client = ctx.ensure_object(dict)["client"]
|
|
77
|
-
remove_tag = True
|
|
78
|
-
|
|
79
|
-
if not yes:
|
|
80
|
-
all_tags = await client.get_all_tags()
|
|
81
|
-
the_tag = [tag for tag in all_tags["tags"] if tag["name"] == tag_name]
|
|
82
|
-
if len(the_tag) > 0:
|
|
83
|
-
unique_resources = []
|
|
84
|
-
for resource in the_tag[0]["resources"]:
|
|
85
|
-
if resource.get("name", "") not in unique_resources:
|
|
86
|
-
unique_resources.append(resource) # Reducing by name in case there are duplicates.
|
|
87
|
-
|
|
88
|
-
if len(unique_resources) > 0:
|
|
89
|
-
remove_tag = click.confirm(
|
|
90
|
-
FeedbackManager.warning_tag_remove(tag_name=tag_name, resources_len=len(unique_resources))
|
|
91
|
-
)
|
|
92
|
-
else:
|
|
93
|
-
remove_tag = click.confirm(FeedbackManager.warning_tag_remove_no_resources(tag_name=tag_name))
|
|
94
|
-
else:
|
|
95
|
-
remove_tag = False
|
|
96
|
-
click.echo(FeedbackManager.error_tag_not_found(tag_name=tag_name))
|
|
97
|
-
|
|
98
|
-
if remove_tag:
|
|
99
|
-
await client.delete_tag(tag_name)
|
|
100
|
-
click.echo(FeedbackManager.success_tag_removed(tag_name=tag_name))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|