+
    Bi                         R t ^ RIt^ RIHt  ^ RIHt ^RIHt	 ^RI
Ht RRR	./t. ROt ! R R
]4      t ! R R]	4      tR t]t]tR#   ] d
    ]! R4      hi ; i)z
Sends updates to a Slack app.

Usage:
>>> from tqdm.contrib.slack import tqdm, trange
>>> for i in trange(10, token='{token}', channel='{channel}'):
...     ...

![screenshot](https://tqdm.github.io/img/screenshot-slack.png)
N)getenv)	WebClientzPlease `pip install slack-sdk`)tqdm)
MonoWorkerzgithub.com/	0x2b3bfa0	casperdclSlackIO
tqdm_slackc                   <   a a ] tR t^t oRtV 3R ltR tRtVtV ;t	# )r   z,Non-blocking file-like IO using a Slack app.c                R  < \         SV `  4        \        VR7      V n        V P                  P
                  V n         V P                  P                  W P                  R7      V n        R#   \         d2   p\        P                  ! \        T4      4       RT n         Rp?R# Rp?ii ; i)z-Creates a new message in the given `channel`.)token)channeltextN)super__init__r   client	__class____name__r   chat_postMessagemessage	Exception	tqdm_autowritestr)selfr   r   er   s   &&& 7/usr/lib/python3.14/site-packages/tqdm/contrib/slack.pyr   SlackIO.__init__   sv    e,NN++		 ;;77ii7XDL 	 OOCF#DLL	 s   +A* *B&5&B!!B&c                   V'       g   RpVP                  RR4      P                  4       pWP                  8X  d   R# V P                  pVf   R# Wn         V P	                  V P
                  P                  VR,          VR,          RV,           R,           R7      pV#   \         d+   p\        P                  ! \        T4      4        Rp?R# Rp?ii ; i)	z,Replaces internal `message`'s text with `s`.z... Nr   ts`)r   r!   r   )replacestripr   r   submitr   chat_updater   r   r   r   )r   sr   futurer   s   &&   r   r   SlackIO.write'   s    AIIdB%%'		>,,?		[[!8!8')BT$+DMa# ! GF
 M  	$OOCF##	$s   AB C(CC)r   r   r   )
r   
__module____qualname____firstlineno____doc__r   r   __static_attributes____classdictcell____classcell__r   __classdict__s   @@r   r   r      s     6	      c                   N   a a ] tR t^;t oRtV 3R ltV 3R ltV 3R ltRtVt	V ;t
# )r	   a  
Standard `tqdm.auto.tqdm` but also sends updates to a Slack app.
May take a few seconds to create (`__init__`).

- create a Slack app with the `chat:write` scope & invite it to a
  channel: <https://api.slack.com/authentication/basics>
- copy the bot `{token}` & `{channel}` and paste below
>>> from tqdm.contrib.slack import tqdm, trange
>>> for i in tqdm(iterable, token='{token}', channel='{channel}'):
...     ...
c           	       < VP                  R4      '       g   VP                  4       p\        P                  ! R4      P	                  \        P
                  4       \        VP                  R\        R4      4      VP                  R\        R4      4      4      V n	        \        RVP                  RR4      4      VR&   \        SV `0  ! V/ VB  R	# )
a3  
Parameters
----------
token  : str, required. Slack token
    [default: ${TQDM_SLACK_TOKEN}].
channel  : int, required. Slack channel
    [default: ${TQDM_SLACK_CHANNEL}].
mininterval  : float, optional.
  Minimum of [default: 1.5] to avoid rate limit.

See `tqdm.auto.tqdm.__init__` for other parameters.
disable
HTTPClientr   TQDM_SLACK_TOKENr   TQDM_SLACK_CHANNELg      ?minintervalN)getcopylogging	getLoggersetLevelWARNINGr   popr   siomaxr   r   r   argskwargsr   s   &*,r   r   tqdm_slack.__init__G   s     zz)$$[[]Fl+44W__E

7F+=$>?

9f-A&BCEDH %(VZZs-K$LF=!$)&)r3   c                \  < \         SV `  ! R/ VB  V P                  pVP                  R R4      '       d.   VR ,          P	                  RR4      P	                  RR4      VR &   MRVR &   VR,          RJ d   . ROVR&   R	VR
&   V P
                  P                  V P                  ! R/ VB 4       R# )
bar_formatNz<bar/>z
`{bar:10}`z{bar}z`{bar:10u}`z{l_bar}`{bar:10}`{r_bar}asciiFiP  ncols )z:black_square:z:small_blue_diamond:z:large_blue_diamond:z:large_blue_square:)r   displayformat_dictr;   r#   rB   r   format_meter)r   rF   fmtr   s   &, r   rM   tqdm_slack.display]   s    !&!77<&& #L 1 9 9,!((/(G  !;Cw<5 3CLCLt((/3/0r3   c                   < \         SV `  ! V/ VB  V P                  '       g   V P                  P	                  R 4       R# R# )r    N)r   clearr6   rB   r   rD   s   &*,r   rS   tqdm_slack.cleark   s2    t&v&|||HHNN2 r3   )rB   )r   r*   r+   r,   r-   r   rM   rS   r.   r/   r0   r1   s   @@r   r	   r	   ;   s     
*,1 r3   c                 (    \        \        V !  3/ VB # )z?Shortcut for `tqdm.contrib.slack.tqdm(range(*args), **kwargs)`.)r	   range)rE   rF   s   *,r   tsrangerW   q   s    eTl-f--r3   )r   r	   rW   r   trange)r-   r=   osr   	slack_sdkr   ImportErrorautor   r   utils_workerr   
__author____all__r   r	   rW   rX   rL   r3   r   <module>r`      s   	  8# % $k;78

@j B3 3l. 	Q  8
6
778s   A	 	A