o 7]hV @stddlmZmZddlmZddlmZddlmZm Z ddl m Z ddl m Z ddlmZmZmZddlmZdd lmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"d d l#m$Z$m%Z%d d l&m'Z'm(Z(m)Z)m*Z*d d l+m,Z,d dl-m.Z.d dl/m0Z0d dl1m2Z2d dl3m4Z4d dl5m6Z6d dl7m8Z8m9Z9d dl:m;Z;me!dZ?ege@fZAGdddeZB          ! " dwd#e"ee?ee?fd$eCd%ee@d&eDd'ee'd(eDd)eege@fd*e@d+e6d,e6d-e6d.e6d/e@d0eDd1ee?fd2d3ZEGd4d5d5eZFGd6d7d7eFZGGd8d9d9eFZHGd:d;d;eFZIGdd?d?eFZKGd@dAdAeFZLGdBdCdCeFZMGdDdEdEeFZNGdFdGdGeFZOGdHdIdIeFZPGdJdKdKeZQeGdLdMdMZRGdNdOdOe.ZSeTdPkr8ddlUZUddlVZVd dQlWmXZXd dRlYmZZZd dSl[m\Z\d dTl7m9Z9e\dUdVddWZ[e9dXdYdZZ7e7]d[d\d]d^eXd_d`e7dadbdcdddee[eZdfg Z^ddgl_m`Z`e`e^Zae'ddhZ&eSeHeIdieJeIdjeLeKe&ddkRZbebjcdldmdnZdebjcdodmdnZeebjcdpdmddqZfebjgs%ebjheddrdsebjheedtdseVidueUjddvd krebkeleaebjgrWddSWddS1s1wYdSdS)x)ABCabstractmethod)deque)Sized) dataclassfield) timedelta)ceil)EventRLockThread) TracebackType)AnyCallableDequeDictIterableList NamedTupleNewTypeOptionalSequenceTupleTypeTypeVarUnion)filesize get_console)Console JustifyMethodRenderableTypeGroup) Highlighter) JupyterMixin)Live) ProgressBar)Spinner) StyleType)ColumnTable)TextTextTypeTaskID ProgressTypecsleZdZdZdddddeffdd Zdd d Zdd dZdee e dee dee d d fddZ Z S) _TrackThreadz)A thread to periodically update progress.progressProgresstask_idr- update_periodcs.||_||_||_t|_d|_tdS)Nr)r0r2r3r done completedsuper__init__)selfr0r2r3 __class__;/usr/lib/python3/dist-packages/pip/_vendor/rich/progress.pyr7/s z_TrackThread.__init__returnNcCsj|j}|jj}|j}d}|jj}||s(|j}||kr$|||||}||r|jj|j|jdddS)NrT)r5refresh)r2r0advancer3r4waitr5update)r8r2r?r3last_completedr@r5r;r;r<run8sz_TrackThread.runcC ||SNstartr8r;r;r< __enter__Fz_TrackThread.__enter__exc_typeexc_valexc_tbcCs|j|dSrE)r4setjoinr8rKrLrMr;r;r<__exit__Js  z_TrackThread.__exit__r=N)r=r/)__name__ __module__ __qualname____doc__floatr7rCrIrr BaseExceptionr rQ __classcell__r;r;r9r<r/,s  r/ Working...NTF bar.back bar.complete bar.finished bar.pulse皙?sequence descriptiontotal auto_refreshconsole transientget_timerefresh_per_secondstylecomplete_stylefinished_style pulse_styler3disabler=c cs|rtdgng}|t|| | | dtdtft||||||p$d| d}||j|||| dEdHWddS1sCwYdS)aTrack progress by iterating over a sequence. Args: sequence (Iterable[ProgressType]): A sequence (must support "len") you wish to iterate over. description (str, optional): Description of task show next to progress bar. Defaults to "Working". total: (float, optional): Total number of steps. Default is len(sequence). auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True. transient: (bool, optional): Clear the progress on exit. Defaults to False. console (Console, optional): Console to write to. Default creates internal Console instance. refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10. style (StyleType, optional): Style for the bar background. Defaults to "bar.back". complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete". finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.done". pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse". update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1. disable (bool, optional): Disable display of progress. Returns: Iterable[ProgressType]: An iterable of the values in the sequence. ([progress.description]{task.description})rirjrkrl-[progress.percentage]{task.percentage:>3.0f}%r[)rdrerfrgrhrm)rcrbr3N) TextColumnextend BarColumnTimeRemainingColumnr1track)rarbrcrdrerfrgrhrirjrkrlr3rmcolumnsr0r;r;r<rtTs8&  "rtc@speZdZUdZdZeeed<ddeeddfddZ defdd Z d d de fd d Z e d d de fddZdS)ProgressColumnz3Base class for a widget to use in progress display.N max_refresh table_columnr=cCs||_i|_d|_dSrE) _table_column_renderable_cache _update_time)r8rxr;r;r<r7s zProgressColumn.__init__cCs |jptS)z.Get a table column, used to build tasks table.)ryr)rHr;r;r<get_table_columns zProgressColumn.get_table_columntaskTaskcCsp|}|jdur)|js)z |j|j\}}Wn tyYn w||j|kr)|S||}||f|j|j<|S)aCalled by the Progress object to return a renderable for the given task. Args: task (Task): An object containing information regarding the task. Returns: RenderableType: Anything renderable (including str). N)rgrwr5rzidKeyErrorrender)r8r} current_time timestamp renderabler;r;r<__call__s   zProgressColumn.__call__cCsdS)z"Should return a renderable object.Nr;r8r}r;r;r<rszProgressColumn.renderrE)rSrTrUrVrwrrW__annotations__r)r7r|r!rrrr;r;r;r<rvs rvcsJeZdZdZ ddddedeeffddZd d d efd d ZZ S)RenderableColumnzA column to insert an arbitrary column. Args: renderable (RenderableType, optional): Any renderable. Defaults to empty string. Nrxrrxc||_tj|ddSNr)rr6r7)r8rrxr9r;r<r7zRenderableColumn.__init__r}r~r=cCs|jSrE)rrr;r;r<rszRenderableColumn.render)r) rSrTrUrVr!rr)r7rrYr;r;r9r<rsrc seZdZdZ     ddedeed ed ed ee f fd d Z  ddedeed eddfddZ ddde fddZ ZS) SpinnerColumnaA column with a 'spinner' animation. Args: spinner_name (str, optional): Name of spinner animation. Defaults to "dots". style (StyleType, optional): Style of spinner. Defaults to "progress.spinner". speed (float, optional): Speed factor of spinner. Defaults to 1.0. finished_text (TextType, optional): Text used when task is finished. Defaults to " ". dotsprogress.spinner? N spinner_namerispeed finished_textrxcs<t|||d|_t|trt|n||_tj|ddS)Nrirr) r'spinner isinstancestrr+ from_markuprr6r7)r8rrirrrxr9r;r<r7s  zSpinnerColumn.__init__ spinner_styler=cCst|||d|_dS)a-Set a new spinner. Args: spinner_name (str): Spinner name, see python -m rich.spinner. spinner_style (Optional[StyleType], optional): Spinner style. Defaults to "progress.spinner". speed (float, optional): Speed factor of spinner. Defaults to 1.0. rN)r'r)r8rrrr;r;r< set_spinners zSpinnerColumn.set_spinnerr}r~cCs$|jr|j}|S|j|}|SrE)finishedrrrrg)r8r}textr;r;r<rszSpinnerColumn.render)rrrrN)rr)rSrTrUrVrrr(rWr,r)r7rr!rrYr;r;r9r<rs<  rcsdeZdZdZ     ddededed ed ee d ee d dffd d Z ddd e fddZ ZS)rpzA column containing text.noneleftTN text_formatrijustifymarkup highlighterrxr=cs:||_||_||_||_||_tj|ptddddS)NTno_wrapr)rrrirrr6r7r))r8rrirrrrxr9r;r<r7s  zTextColumn.__init__r}r~cCsR|jj|d}|jrtj||j|jd}n t||j|jd}|jr'|j||S)Nr})rir) rformatrr+rrirr highlight)r8r}_textrr;r;r<rs zTextColumn.render)rrTNN)rSrTrUrVrr(r boolrr#r)r7r+rrYr;r;r9r<rps.rpcsfeZdZdZ      ddeed ed ed ed ed eeddffdd Zddde fddZ Z S)rraRenders a visual progress bar. Args: bar_width (Optional[int], optional): Width of bar or None for full width. Defaults to 40. style (StyleType, optional): Style for the bar background. Defaults to "bar.back". complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete". finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.done". pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse". (r\r]r^r_N bar_widthrirjrkrlrxr=cs0||_||_||_||_||_tj|ddSr)rrirjrkrlr6r7)r8rrirjrkrlrxr9r;r<r7.s  zBarColumn.__init__r}r~c CsPttd|jtd|j|jdurdntd|j|j ||j|j|j |j d S)z&Gets a progress bar widget for a task.rNr) rcr5widthpulseanimation_timerirjrkrl) r&maxrcr5rstartedrgrirjrkrlrr;r;r<r>s  zBarColumn.render)rr\r]r^r_N) rSrTrUrVrintr(r)r7r&rrYr;r;r9r<rr#s0 rrc@"eZdZdZdddefddZdS)TimeElapsedColumnzRenders time elapsed.r}r~r=cCsD|jr|jn|j}|durtdddStt|d}tt|ddS)Show time remaining.N-:--:--zprogress.elapsedriseconds)r finished_timeelapsedr+rrr)r8r}rdeltar;r;r<rPs  zTimeElapsedColumn.renderNrSrTrUrVr+rr;r;r;r<rMrc@s&eZdZdZdZdddefddZdS) rsz!Renders estimated time remaining.?r}r~r=cCs8|j}|dur tdddStt|d}tt|ddS)rNrzprogress.remainingrr)time_remainingr+rrr)r8r} remainingremaining_deltar;r;r<r_s  zTimeRemainingColumn.renderN)rSrTrUrVrwr+rr;r;r;r<rsYsrsc@r)FileSizeColumnzRenders completed filesize.r}r~r=cCtt|j}t|ddS)Show data completed.zprogress.filesizer)rdecimalrr5r+r8r} data_sizer;r;r<rk zFileSizeColumn.renderNrr;r;r;r<rhrrc@r)TotalFileSizeColumnzRenders total filesize.r}r~r=cCr)rzprogress.filesize.totalr)rrrrcr+rr;r;r<rtrzTotalFileSizeColumn.renderNrr;r;r;r<rqrrcsHeZdZdZ d dedeeddffdd Zd d defd d Z Z S)DownloadColumnzRenders file size downloaded and total, e.g. '0.5/2.3 GB'. Args: binary_units (bool, optional): Use binary units, KiB, MiB etc. Defaults to False. FN binary_unitsrxr=crr)rr6r7)r8rrxr9r;r<r7rzDownloadColumn.__init__r}r~c Cst|j}t|j}|jrt|gdd\}}n t|gdd\}}||}||}|dkr2dnd}|d|d} |d|d} | d | d |} t| d d } | S) z.Calculate common unit for completed and total.) bytesKiBMiBGiBTiBPiBEiBZiBYiBi) rKBMBGBTBPBEBZBYBrrz,.f/rzprogress.downloadr)rr5rcrrpick_unit_and_suffixr+) r8r}r5rcunitsuffixcompleted_ratio total_ratio precision completed_str total_strdownload_status download_textr;r;r<rs&     zDownloadColumn.render)FN) rSrTrUrVrrr)r7r+rrYr;r;r9r<rzsrc@r)TransferSpeedColumnz&Renders human readable transfer speed.r}r~r=cCs@|jp|j}|durtdddStt|}t|dddS)zShow data transfer speed.N?zprogress.data.speedrz/s)finished_speedrr+rrr)r8r}r data_speedr;r;r<rs  zTransferSpeedColumn.renderNrr;r;r;r<rrrc@s$eZdZUdZeed< eed<dS)ProgressSamplez$Sample of progress for a given time.rr5N)rSrTrUrVrWrr;r;r;r<rs rc@seZdZUdZeed< eed< eed< eed< eed< dZ e eed< d Z e ed < e ed Zeeefed < e dd d dZe eed< e dd d dZe eed< dZe eed< e ed d dZeeed<e d edZeed< defddZede fddZedefddZede efddZede fdd Z edefd!d"Z!ede efd#d$Z"ede efd%d&Z#d)d'd(Z$dS)*r~zInformation regarding a progress task. This object should be considered read-only outside of the :class:`~Progress` class. rrbrcr5 _get_timeNrTvisible)default_factoryfieldsF)defaultinitrepr start_time stop_timer)rrr _progress)rr_lockr=cCs|S)z(float: Get the current time, in seconds.)rrHr;r;r<rgz Task.get_timecC |jduS)z#bool: Check if the task as started.N)rrHr;r;r<r z Task.startedcCs |j|jS)z)float: Get the number of steps remaining.)rcr5rHr;r;r<rs zTask.remainingcCs2|jdurdS|jdur|j|jS||jS)z]Optional[float]: Time elapsed since task was started, or ``None`` if the task hasn't started.N)rrrgrHr;r;r<rs   z Task.elapsedcCr)zCheck if the task has finished.N)rrHr;r;r<rrz Task.finishedcCs.|jsdS|j|jd}tdtd|}|S)z,float: Get progress of task as a percentage.Y@)rcr5minr)r8r5r;r;r< percentages zTask.percentagecCs|jdurdS|jD|j}|s WddS|dj|dj}|dkr0 WddSt|}t|tdd|D}||}|WdS1sQwYdS)z=Optional[float]: Get the estimated speed in steps per second.Nrcs|]}|jVqdSrE)r5).0sampler;r;r< zTask.speed..)rrrriternextsum)r8r0 total_time iter_progresstotal_completedrr;r;r<r s" $z Task.speedcCs*|jrdS|j}|s dSt|j|}|S)zJOptional[float]: Get estimated time to completion, or ``None`` if no data.rN)rrr r)r8restimater;r;r<rszTask.time_remainingcCs|jd|_d|_dS)zReset progress.N)rclearrrrHr;r;r<_reset&s  z Task._resetrR)%rSrTrUrVr-rrrWGetTimeCallablerrrrrdictrrrrrrrrrrr rrgpropertyrrrrrrrrr;r;r;r<r~sZ   r~c@seZdZdZddddddddddd deeefd eed e d e d e d e de de dee de de ddfddZ e defddZe deefddZe deefddZe de fddZdVddZdVd d!ZdWd"d#Zd$eeed%eed&eeddfd'd(Z   ) *dXd+eeeeefd,ee d-eed.ed/e deef d0d1Zd-eddfd2d3Z d-eddfd4d5Z!ddddddd6d-ed,ee d7ee d8ee d.eed9ee d:e d;e"ddfdddd?d-ed@e d,ee d7e$d9ee d.eed;e"ddfdAdBZ%dYd-ed8e ddfdDdEZ&dVdFdGZ'de(fdHdIZ)dee(fdJdKZ*dLeede+fdMdNZ,de(fdOdPZ-  Q > dZd.ed@e d,e d7e$d9e d;e"defdRdSZ.d-eddfdTdUZ/dS)[r1aRenders an auto-updating progress bar(s). Args: console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout. auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`. refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None. speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30. transient: (bool, optional): Clear the progress on exit. Defaults to False. redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True. redirect_stderr: (bool, optional): Enable redirection of stderr. Defaults to True. get_time: (Callable, optional): A callable that gets the current time, or None to use Console.get_time. Defaults to None. disable (bool, optional): Disable progress display. Defaults to False expand (bool, optional): Expand tasks table to fit width. Defaults to False. NTr[g>@F) rerdrhspeed_estimate_periodrfredirect_stdoutredirect_stderrrgrmexpandrurerdrhrrfrrrgrmrr=c Gs|dus |dks Jdt|_| ptdttdtf|_||_| |_| |_i|_ t d|_ t |p5t ||||||jd|_|pE|jj|_|jj|_|jj|_dS)Nrzrefresh_per_second must be > 0rnro)rerdrhrfrrget_renderable)r rrprrrsrurrmr_tasksr- _task_indexr%rrliverergprintlog) r8rerdrhrrfrrrgrmrrur;r;r<r7=s6  zProgress.__init__cCs|jjSrE)rrerHr;r;r<rehrzProgress.consolecC8|jt|jWdS1swYdS)zGet a list of Task instances.N)rlistrvaluesrHr;r;r<tasksl $zProgress.taskscCr)zA list of task IDs.N)rr rkeysrHr;r;r<task_idsrr#zProgress.task_idscCsZ|j |js WddStdd|jDWdS1s&wYdS)z'Check if all tasks have been completed.NTcsrrE)r)rr}r;r;r<r~rz$Progress.finished..)rrallr!rHr;r;r<rxs $zProgress.finishedcCs|js |jjdddSdS)zStart the progress display.T)r>N)rmrrGrHr;r;r<rGszProgress.startcCs$|j|jjs|jdSdS)zStop the progress display.N)rstopreis_interactiverrHr;r;r<r's z Progress.stopcCrDrErFrHr;r;r<rIrJzProgress.__enter__rKrLrMcCs |dSrE)r'rPr;r;r<rQs zProgress.__exit__rZr`rarcr2rbr3c cs|durt|trtt|}n td|d|}|dur'|j||d}n|j||d|jjrZt |||}|D] }|V|j d7_ q;WddS1sSwYdS|j } |j } |D] }|V| |d| qbdS)aTrack progress by iterating over a sequence. Args: sequence (Sequence[ProgressType]): A sequence of values you want to iterate over and track progress. total: (float, optional): Total number of steps. Default is len(sequence). task_id: (TaskID): Task to track. Default is new task. description: (str, optional): Description of task, if new task is created. update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1. Returns: Iterable[ProgressType]: An iterable of values taken from the provided sequence. Nzunable to get size of z, please specify 'total'rcr) rrrWlen ValueErroradd_taskrArrdr/r5r?r>) r8rarcr2rbr3 task_total track_threadvaluer?r>r;r;r<rts2  " zProgress.trackcCsZ|j |j|}|jdur||_WddSWddS1s&wYdS)zStart a task. Starts a task (used when calculating elapsed time). You may need to call this manually, if you called ``add_task`` with ``start=False``. Args: task_id (TaskID): ID of task. N)rrrrg)r8r2r}r;r;r< start_tasks   "zProgress.start_taskcCsT|j|j|}|}|jdur||_||_WddS1s#wYdS)zStop a task. This will freeze the elapsed time on the task. Args: task_id (TaskID): ID of task. N)rrrgrr)r8r2r}rr;r;r< stop_tasks  "zProgress.stop_task)rcr5r?rbrr>r5r?rr>rcKs\|j|j|} | j} |dur|| jkr|| _| |dur'| j|7_|dur.|| _|dur5|| _|dur<|| _| j|| j| } | } | |j } | j }|j }|rk|dj | krk||rk|dj | ks_t|dkrz|t|dksq| dkr|t| | | j| jkr| jdur| j| _Wdn1swY|r|dSdS)aUpdate information associated with a task. Args: task_id (TaskID): Task id (returned by add_task). total (float, optional): Updates task.total if not None. completed (float, optional): Updates task.completed if not None. advance (float, optional): Add a value to task.completed if not None. description (str, optional): Change task description if not None. visible (bool, optional): Set visible flag if not None. refresh (bool): Force a refresh of progress information. Default is False. **fields (Any): Additional data fields required for rendering. Nrr)rrr5rcrrbrrrArgrrpopleftrr*appendrrrr>)r8r2rcr5r?rbrr>rr}completed_startupdate_completedrold_sample_timerr2r;r;r<rAsF       zProgress.updater)rGrcr5rrbrGc Ks|}|j8|j|} | |r|nd| _|dur|| _|| _|dur)|| _|r.|| _|dur5|| _ d| _ Wdn1sBwY| dS)aReset a task so completed is 0 and the clock is reset. Args: task_id (TaskID): ID of task. start (bool, optional): Start the task after reset. Defaults to True. total (float, optional): New total steps in task, or None to use current total. Defaults to None. completed (int, optional): Number of steps completed. Defaults to 0. **fields (str): Additional data fields required for rendering. N) rgrrrrrcr5rrrbrr>) r8r2rGrcr5rrbrrr}r;r;r<reset s"  zProgress.resetrc Cs|}|jw|j|}|j}|j|7_|j|}||j}|j}|j} |r<|dj|kr<| |r<|dj|ks0t|dkrK| t|dksB| t |||j|j krn|j durv|j |_ |j|_WddSWddSWddS1swYdS)zAdvance task by a number of steps. Args: task_id (TaskID): ID of task. advance (float): Number of steps to advance. Default is 1. rrN)rgrrr5rrr2rr*r3rrcrrrr) r8r2r?rr}r4r5r6rr2r;r;r<r?Es0      "zProgress.advancecCs$|js|jjr|jdSdSdS)z*Refresh (render) the progress information.N)rmr is_startedr>rHr;r;r<r>_szProgress.refreshcCst|}|S)z*Get a renderable for the progress display.)r"get_renderables)r8rr;r;r<rds zProgress.get_renderableccs||j}|VdS)z5Get a number of renderables for the progress display.N)make_tasks_tabler")r8tabler;r;r<r9is  zProgress.get_renderablesr"csRdd|jD}tj|d|jd}|D]jr&|jfdd|jDq|S)zGet a table to render the Progress display. Args: tasks (Iterable[Task]): An iterable of Task instances, one per row of the table. Returns: Table: A table instance. css0|]}t|trtddn|VqdS)TrN)rrr)r|copy)r_columnr;r;r<rws  z,Progress.make_tasks_table..)rr)paddingrc3s.|]}t|tr|jdn|VqdS)rN)rrr)rcolumnrr;r<rs )rur*gridrradd_row)r8r" table_columnsr;r;rr<r:ns   zProgress.make_tasks_tablecCs2|j |WdS1swYdS)z+Makes the Progress class itself renderable.N)rrrHr;r;r<__rich__s$zProgress.__rich__rc Ks|j2t|j||||||j|jd}||j|j<|r!||j|j}tt|jd|_Wdn1s8wY||S)aAdd a new 'task' to the Progress display. Args: description (str): A description of the task. start (bool, optional): Start the task immediately (to calculate elapsed time). If set to False, you will need to call `start` manually. Defaults to True. total (float, optional): Number of total steps in the progress if know. Defaults to 100. completed (int, optional): Number of steps completed so far.. Defaults to 0. visible (bool, optional): Enable display of the task. Defaults to True. **fields (str): Additional data fields required for rendering. Returns: TaskID: An ID you can use when calling `update`. )rrrrrN) rr~rrgrr0r-rr>) r8rbrGrcr5rrr}new_task_indexr;r;r<r,s&  zProgress.add_taskcCs4|j |j|=WddS1swYdS)z]Delete a task if it exists. Args: task_id (TaskID): A task ID. N)rr)r8r2r;r;r< remove_tasks "zProgress.remove_taskrR)r=r1)NNrZr`)r)TrrT)0rSrTrUrVrrrvrrrrWrr7rrerr~r"r-r%rrGr'rIrrXr rQrr.rrtr0r1rrArr7r?r>r!rr9r*r:rCr,rEr;r;r;r<r1-s*      +       1   ?  % ! *r1__main__)Panel)Rule)Syntax)r*a~def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: """Iterate and generate a tuple with a flag for last value.""" iter_values = iter(values) try: previous_value = next(iter_values) except StopIteration: return for value in iter_values: yield False, previous_value previous_value = value yield True, previous_valuepython) line_numbersfoobarbaz123z:Text may be printed while the progress bars are rendering.z(In fact, [i]any[/i] renderable will workzSuch as [magenta]tables[/]...zPretty printed structures...examplezPretty printed)typerz Syntax...zGive it a try!)cycle)recordrnro)rerfz[red]Downloadingrr)z[green]Processingz[yellow]Thinking)rcrGr)r?g333333?g{Gz?d) rZNTNFNr[r\r]r^r_r`F)mabcrr collectionsrcollections.abcr dataclassesrrdatetimermathr threadingr r r typesr typingrrrrrrrrrrrrrrrrrrerr r!r"rr#jupyterr$rr% progress_barr&rr'rir(r;r)r*rr+r,rr-r.rWrr/rrrtrvrrrprrrrsrrrrrr~r1rSrandomtimepanelrGrulerHsyntaxrIrAprogress_renderables itertoolsrTexamplesr0r,task1task2task3rrAsleeprandintrr r;r;r;r<s     @        *      D*2*   %  x            $