tinybird 0.0.1.dev222__py3-none-any.whl → 0.0.1.dev223__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/ch_utils/constants.py +1 -0
- tinybird/tb/__cli__.py +2 -2
- tinybird/tb/modules/token.py +9 -17
- {tinybird-0.0.1.dev222.dist-info → tinybird-0.0.1.dev223.dist-info}/METADATA +1 -1
- {tinybird-0.0.1.dev222.dist-info → tinybird-0.0.1.dev223.dist-info}/RECORD +8 -8
- {tinybird-0.0.1.dev222.dist-info → tinybird-0.0.1.dev223.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev222.dist-info → tinybird-0.0.1.dev223.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev222.dist-info → tinybird-0.0.1.dev223.dist-info}/top_level.txt +0 -0
tinybird/ch_utils/constants.py
CHANGED
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.dev223'
|
|
8
|
+
__revision__ = '3fd90ce'
|
tinybird/tb/modules/token.py
CHANGED
|
@@ -165,22 +165,20 @@ def parse_fixed_params(fixed_params_list):
|
|
|
165
165
|
def create(ctx: Context) -> None:
|
|
166
166
|
"""Token creation commands.
|
|
167
167
|
|
|
168
|
-
You can create two types of tokens:
|
|
168
|
+
You can create two types of tokens: Static or JWT.
|
|
169
|
+
|
|
170
|
+
* Static Tokens do not have a TTL and can have any valid scope (ADMIN, TOKENS, or ORG_DATASOURCES:READ).
|
|
169
171
|
|
|
170
172
|
* JWT tokens have a TTL and can only have the PIPES:READ scope.Their main use case is allow your users to call your endpoints without exposing your API key.
|
|
171
173
|
|
|
172
|
-
* Static Tokens do not have a TTL and can have any valid scope (DATASOURCES:READ, DATASOURCES:APPEND, DATASOURCES:CREATE, DATASOURCES:DROP, PIPES:CREATE, PIPES:READ, PIPES:DROP).
|
|
173
174
|
|
|
174
175
|
Examples:
|
|
175
176
|
|
|
176
|
-
tb token create
|
|
177
|
-
|
|
178
|
-
tb token create static my_static_token --scope PIPES:READ --resource my_pipe
|
|
177
|
+
tb token create static my_static_token --scope ADMIN
|
|
179
178
|
|
|
180
|
-
tb token create static my_static_token --scope
|
|
181
|
-
|
|
182
|
-
tb token create static my_static_token --scope DATASOURCES:READ --resource my_datasource --filters "column_name=value"
|
|
179
|
+
tb token create static my_static_token --scope TOKENS
|
|
183
180
|
|
|
181
|
+
tb token create jwt my_jwt_token --ttl 1h --scope PIPES:READ --resource my_pipe
|
|
184
182
|
"""
|
|
185
183
|
|
|
186
184
|
|
|
@@ -248,13 +246,9 @@ async def create_jwt_token(ctx: Context, name: str, ttl: timedelta, scope, resou
|
|
|
248
246
|
|
|
249
247
|
# Valid scopes for Static Tokens
|
|
250
248
|
valid_scopes = [
|
|
251
|
-
"
|
|
252
|
-
"
|
|
253
|
-
"
|
|
254
|
-
"DATASOURCES:DROP",
|
|
255
|
-
"PIPES:CREATE",
|
|
256
|
-
"PIPES:READ",
|
|
257
|
-
"PIPES:DROP",
|
|
249
|
+
"ADMIN",
|
|
250
|
+
"TOKENS",
|
|
251
|
+
"ORG_DATASOURCES:READ",
|
|
258
252
|
]
|
|
259
253
|
|
|
260
254
|
|
|
@@ -271,8 +265,6 @@ class DynamicOptionsCommand(click.Command):
|
|
|
271
265
|
# Options
|
|
272
266
|
dynamic_options_help += "Options:\n"
|
|
273
267
|
dynamic_options_help += f" --scope [{','.join(valid_scopes)}] Scope for the token [Required]\n"
|
|
274
|
-
dynamic_options_help += " --resource TEXT Resource you want to associate the scope with\n"
|
|
275
|
-
dynamic_options_help += " --filter TEXT SQL condition used to filter the values when calling with this token (eg. --filter=value > 0) \n"
|
|
276
268
|
dynamic_options_help += " -h, --help Show this message and exit.\n"
|
|
277
269
|
|
|
278
270
|
return dynamic_options_help
|
|
@@ -10,14 +10,14 @@ tinybird/sql_template_fmt.py,sha256=KUHdj5rYCYm_rKKdXYSJAE9vIyXUQLB0YSZnUXHeBlY,
|
|
|
10
10
|
tinybird/sql_toolset.py,sha256=M2rpLYkgV2W8NnYEYPC1tJdpy4uZHXVF64NBSKLQka4,19549
|
|
11
11
|
tinybird/syncasync.py,sha256=IPnOx6lMbf9SNddN1eBtssg8vCLHMt76SuZ6YNYm-Yk,27761
|
|
12
12
|
tinybird/tornado_template.py,sha256=jjNVDMnkYFWXflmT8KU_Ssbo5vR8KQq3EJMk5vYgXRw,41959
|
|
13
|
-
tinybird/ch_utils/constants.py,sha256=
|
|
13
|
+
tinybird/ch_utils/constants.py,sha256=yEKR11gLCL-irEXXF9QwShaR0JLXiBTlaxfolcCIoqY,4097
|
|
14
14
|
tinybird/ch_utils/engine.py,sha256=X4tE9OrfaUy6kO9cqVEzyI9cDcmOF3IAssRRzsTsfEQ,40781
|
|
15
15
|
tinybird/datafile/common.py,sha256=9hC1APatnfFeYXyTm_s47VmXP0JUajvpkw1vsrSXo70,91664
|
|
16
16
|
tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1wnI,556
|
|
17
17
|
tinybird/datafile/parse_connection.py,sha256=tRyn2Rpr1TeWet5BXmMoQgaotbGdYep1qiTak_OqC5E,1825
|
|
18
18
|
tinybird/datafile/parse_datasource.py,sha256=ssW8QeFSgglVFi3sDZj_HgkJiTJ2069v2JgqnH3CkDE,1825
|
|
19
19
|
tinybird/datafile/parse_pipe.py,sha256=xf4m0Tw44QWJzHzAm7Z7FwUoUUtr7noMYjU1NiWnX0k,3880
|
|
20
|
-
tinybird/tb/__cli__.py,sha256=
|
|
20
|
+
tinybird/tb/__cli__.py,sha256=MLMlpIY_kNVaKk4136zv78wFe159HhB0f9z8sGk6MbI,247
|
|
21
21
|
tinybird/tb/check_pypi.py,sha256=i3l2L8IajeB7sreikR7oPlYJki9MtS3c_M4crnmbByc,760
|
|
22
22
|
tinybird/tb/cli.py,sha256=0xYk2Ip4vb3nNFbxfTdG3VoIgdRvUKVbUVU_mviErPA,1107
|
|
23
23
|
tinybird/tb/client.py,sha256=FKj61vY9STPW03kfVcxYuY1_csI-kP-mc1ERQfqJtg8,56505
|
|
@@ -58,7 +58,7 @@ tinybird/tb/modules/sink.py,sha256=bIjLjog4XH42yfp944cMnaE4il7Kl7Wn7F-nLKfH2Bc,3
|
|
|
58
58
|
tinybird/tb/modules/table.py,sha256=4XrtjM-N0zfNtxVkbvLDQQazno1EPXnxTyo7llivfXk,11035
|
|
59
59
|
tinybird/tb/modules/telemetry.py,sha256=T9gtsQffWqG_4hRBaUJPzOfMkPwz7mH-R6Bn1XRYViA,11482
|
|
60
60
|
tinybird/tb/modules/test.py,sha256=XakpYi0Q2gGKItpPdtRVLKzQldkvCPqzPhwwbUxyrmc,13292
|
|
61
|
-
tinybird/tb/modules/token.py,sha256=
|
|
61
|
+
tinybird/tb/modules/token.py,sha256=pSlDed5RzcadJlvIKQh22Y49gt1Rfw-0rCTko6x4y3g,12879
|
|
62
62
|
tinybird/tb/modules/watch.py,sha256=HhruZoUrehlxL_nFIK3BlpHp2uyzKAM9cmNXBCa4Zgs,8965
|
|
63
63
|
tinybird/tb/modules/workspace.py,sha256=ngn5yGG9K9sFaUzm0W42j_vQnm3pQS2Jh38GNgbMtP0,11607
|
|
64
64
|
tinybird/tb/modules/workspace_members.py,sha256=RYLpyPM1ECCasHRg3uvpckzXplX0_KgNFsSPZn_i6qk,8744
|
|
@@ -82,8 +82,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
|
|
|
82
82
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
83
83
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
84
84
|
tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
|
|
85
|
-
tinybird-0.0.1.
|
|
86
|
-
tinybird-0.0.1.
|
|
87
|
-
tinybird-0.0.1.
|
|
88
|
-
tinybird-0.0.1.
|
|
89
|
-
tinybird-0.0.1.
|
|
85
|
+
tinybird-0.0.1.dev223.dist-info/METADATA,sha256=zlNXkkGzvZwDAbA5oEXPTubPsR0M0-jPbEVix8550bQ,1682
|
|
86
|
+
tinybird-0.0.1.dev223.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
87
|
+
tinybird-0.0.1.dev223.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
88
|
+
tinybird-0.0.1.dev223.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
89
|
+
tinybird-0.0.1.dev223.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|