nui-python-shared-utils 1.4.1__py3-none-any.whl → 1.5.0__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.
- {nui_python_shared_utils-1.4.1.dist-info → nui_python_shared_utils-1.5.0.dist-info}/METADATA +1 -1
- {nui_python_shared_utils-1.4.1.dist-info → nui_python_shared_utils-1.5.0.dist-info}/RECORD +7 -7
- nui_shared_utils/slack_client.py +16 -3
- {nui_python_shared_utils-1.4.1.dist-info → nui_python_shared_utils-1.5.0.dist-info}/WHEEL +0 -0
- {nui_python_shared_utils-1.4.1.dist-info → nui_python_shared_utils-1.5.0.dist-info}/entry_points.txt +0 -0
- {nui_python_shared_utils-1.4.1.dist-info → nui_python_shared_utils-1.5.0.dist-info}/licenses/LICENSE +0 -0
- {nui_python_shared_utils-1.4.1.dist-info → nui_python_shared_utils-1.5.0.dist-info}/top_level.txt +0 -0
{nui_python_shared_utils-1.4.1.dist-info → nui_python_shared_utils-1.5.0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nui-python-shared-utils
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: Shared Python utilities for AWS Lambda, CLI tools, and agents with Slack, Elasticsearch, and monitoring integrations
|
|
5
5
|
Home-page: https://github.com/nuimarkets/nui-python-shared-utils
|
|
6
6
|
Author: NUI Markets
|
|
@@ -21,7 +21,7 @@ nui_lambda_shared_utils/slack_setup/__init__.py,sha256=q78NzSznsSd3ri5OUohWxQt7r
|
|
|
21
21
|
nui_lambda_shared_utils/slack_setup/channel_creator.py,sha256=xaeqzyEAqVqYj2EhN69UvcyZQ6LdFKYODPPCwxHInLA,172
|
|
22
22
|
nui_lambda_shared_utils/slack_setup/channel_definitions.py,sha256=3TkdLzWvEMBMDy5jqOPMUGRgKQ3z9TN58D43V7O7LpE,180
|
|
23
23
|
nui_lambda_shared_utils/slack_setup/setup_helpers.py,sha256=ex_RiUfiZqH9qGLQwmedezMbfp35uI-VQPevducfbBk,168
|
|
24
|
-
nui_python_shared_utils-1.
|
|
24
|
+
nui_python_shared_utils-1.5.0.dist-info/licenses/LICENSE,sha256=vGe2mC5yLUb8toYlY3T36ZwCB5zQUW5hlCtEMiqokhM,1071
|
|
25
25
|
nui_shared_utils/__init__.py,sha256=WOpBwxBqJK_wq8l3s5TCCs4j__lMTbI7TjraTXfmH4c,11851
|
|
26
26
|
nui_shared_utils/base_client.py,sha256=I1lKQGhrKyvujV2zps0TrtEdPDqMCwRQaIh6ceGONXQ,11016
|
|
27
27
|
nui_shared_utils/cli.py,sha256=JJpSoQWKvAz4b8cO30yFNi5vY9jmqrCHzbFpvrVTkbU,8747
|
|
@@ -37,7 +37,7 @@ nui_shared_utils/llm.py,sha256=adNUO8Qbeb3__GvpROxWSUERkpiazKiGJFE5xzU5eZ0,8351
|
|
|
37
37
|
nui_shared_utils/log_processors.py,sha256=x5gz1LEkbmoMCZ3ZB6q-mbn26dSzwh1trz4wSkBGxqk,5538
|
|
38
38
|
nui_shared_utils/powertools_helpers.py,sha256=qc-lYLfY-QX20gALfPOJcihrtJhiCU-fJW8rsPT7LJE,11037
|
|
39
39
|
nui_shared_utils/secrets_helper.py,sha256=_jQkMWzjayZ8vvyHG2yuuxur-SQYUUONfcsZ0MF8qOw,7025
|
|
40
|
-
nui_shared_utils/slack_client.py,sha256=
|
|
40
|
+
nui_shared_utils/slack_client.py,sha256=wXE0D4T4FWt1giz9Xmp71RustpaJYeLAZo6JxulDVko,25550
|
|
41
41
|
nui_shared_utils/slack_formatter.py,sha256=95g6XfAJst7RVhd0M0ahiF3gWWW5j96WYkCg5tLS6Zg,10894
|
|
42
42
|
nui_shared_utils/snowflake_client.py,sha256=e3jH6_2mMqbtP1TE8-mUFFYrfGW9eqUPT5tlcgeCqx8,16181
|
|
43
43
|
nui_shared_utils/timezone.py,sha256=TvtSZV7w3Vvz3NbMTcJSNbUf0ZxPwpFS-xfgye1h-4Q,3583
|
|
@@ -46,8 +46,8 @@ nui_shared_utils/slack_setup/__init__.py,sha256=OElyS3xk4F_YKH5uUUTDpN0ah1dOO3e5
|
|
|
46
46
|
nui_shared_utils/slack_setup/channel_creator.py,sha256=0gyCBIS0EC96SVn1Z2dD4Fpzk0xNdHSWyiCxoUQIUe8,10667
|
|
47
47
|
nui_shared_utils/slack_setup/channel_definitions.py,sha256=atfz5ZhpqefOeLh1gShbWd-TLzgjPmhv95bfuTdmZog,5676
|
|
48
48
|
nui_shared_utils/slack_setup/setup_helpers.py,sha256=pzzXMs12GI9sdZttWeYzgLPgC0xqPz7ZLHM1GUPNNXc,7219
|
|
49
|
-
nui_python_shared_utils-1.
|
|
50
|
-
nui_python_shared_utils-1.
|
|
51
|
-
nui_python_shared_utils-1.
|
|
52
|
-
nui_python_shared_utils-1.
|
|
53
|
-
nui_python_shared_utils-1.
|
|
49
|
+
nui_python_shared_utils-1.5.0.dist-info/METADATA,sha256=DYwyqAyRcrN3Kxy9CVVTf4CRXmqNdlqcfYF_yA2MKuQ,22632
|
|
50
|
+
nui_python_shared_utils-1.5.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
51
|
+
nui_python_shared_utils-1.5.0.dist-info/entry_points.txt,sha256=TrJ3Z4kz3oXfy6InXn20jHu7rnTwo-4EA0KRFX3fkL0,66
|
|
52
|
+
nui_python_shared_utils-1.5.0.dist-info/top_level.txt,sha256=sNceq5okmEB54L-gm4a0OgGhnPlU62zYmlUoXKn-Fa8,41
|
|
53
|
+
nui_python_shared_utils-1.5.0.dist-info/RECORD,,
|
nui_shared_utils/slack_client.py
CHANGED
|
@@ -388,7 +388,9 @@ class SlackClient(BaseClient, ServiceHealthMixin):
|
|
|
388
388
|
blocks: Optional[List[Dict]] = None,
|
|
389
389
|
attachments: Optional[List[Dict]] = None,
|
|
390
390
|
include_lambda_header: bool = True,
|
|
391
|
-
event_type: Optional[str] = None
|
|
391
|
+
event_type: Optional[str] = None,
|
|
392
|
+
unfurl_links: Optional[bool] = None,
|
|
393
|
+
unfurl_media: Optional[bool] = None,
|
|
392
394
|
) -> bool:
|
|
393
395
|
"""
|
|
394
396
|
Send message to Slack channel with standardized error handling.
|
|
@@ -400,6 +402,10 @@ class SlackClient(BaseClient, ServiceHealthMixin):
|
|
|
400
402
|
attachments: Legacy attachment objects (supports color sidebars)
|
|
401
403
|
include_lambda_header: Whether to include context header
|
|
402
404
|
event_type: Optional event type label for header (e.g., "Scheduled", "API", "SQS")
|
|
405
|
+
unfurl_links: Override Slack link unfurling. None leaves Slack's default;
|
|
406
|
+
False suppresses link preview cards (links stay clickable)
|
|
407
|
+
unfurl_media: Override Slack media unfurling. None leaves Slack's default;
|
|
408
|
+
False suppresses media preview cards
|
|
403
409
|
|
|
404
410
|
Returns:
|
|
405
411
|
True if successful, False otherwise
|
|
@@ -419,12 +425,19 @@ class SlackClient(BaseClient, ServiceHealthMixin):
|
|
|
419
425
|
else:
|
|
420
426
|
blocks_with_header = blocks
|
|
421
427
|
|
|
422
|
-
|
|
428
|
+
kwargs = dict(
|
|
423
429
|
channel=channel,
|
|
424
430
|
text=text,
|
|
425
431
|
blocks=blocks_with_header,
|
|
426
|
-
attachments=attachments
|
|
432
|
+
attachments=attachments,
|
|
427
433
|
)
|
|
434
|
+
# Forward unfurl controls only when explicitly set, so existing callers
|
|
435
|
+
# keep Slack's default behavior (and their call assertions stay unchanged).
|
|
436
|
+
if unfurl_links is not None:
|
|
437
|
+
kwargs["unfurl_links"] = unfurl_links
|
|
438
|
+
if unfurl_media is not None:
|
|
439
|
+
kwargs["unfurl_media"] = unfurl_media
|
|
440
|
+
response = self._service_client.chat_postMessage(**kwargs)
|
|
428
441
|
|
|
429
442
|
if response["ok"]:
|
|
430
443
|
log.info(
|
|
File without changes
|
{nui_python_shared_utils-1.4.1.dist-info → nui_python_shared_utils-1.5.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{nui_python_shared_utils-1.4.1.dist-info → nui_python_shared_utils-1.5.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{nui_python_shared_utils-1.4.1.dist-info → nui_python_shared_utils-1.5.0.dist-info}/top_level.txt
RENAMED
|
File without changes
|