|
Let us walk on the 3-isogeny graph
|
Data Structures | |
| class | _ReadContext |
| class | _Reader |
| class | _TrackThread |
| class | BarColumn |
| class | DownloadColumn |
| class | FileSizeColumn |
| class | MofNCompleteColumn |
| class | Progress |
| class | ProgressColumn |
| class | ProgressSample |
| class | RenderableColumn |
| class | SpinnerColumn |
| class | Task |
| class | TaskProgressColumn |
| class | TextColumn |
| class | TimeElapsedColumn |
| class | TimeRemainingColumn |
| class | TotalFileSizeColumn |
| class | TransferSpeedColumn |
Functions | |
| Iterable[ProgressType] | track (Union[Sequence[ProgressType], Iterable[ProgressType]] sequence, str description="Working...", Optional[float] total=None, bool auto_refresh=True, Optional[Console] console=None, bool transient=False, Optional[Callable[[], float]] get_time=None, float refresh_per_second=10, StyleType style="bar.back", StyleType complete_style="bar.complete", StyleType finished_style="bar.finished", StyleType pulse_style="bar.pulse", float update_period=0.1, bool disable=False, bool show_speed=True) |
| ContextManager[BinaryIO] | wrap_file (BinaryIO file, int total, *str description="Reading...", bool auto_refresh=True, Optional[Console] console=None, bool transient=False, Optional[Callable[[], float]] get_time=None, float refresh_per_second=10, StyleType style="bar.back", StyleType complete_style="bar.complete", StyleType finished_style="bar.finished", StyleType pulse_style="bar.pulse", bool disable=False) |
| ContextManager[TextIO] | open (Union[str, "PathLike[str]", bytes] file, Union[Literal["rt"], Literal["r"]] mode, int buffering=-1, Optional[str] encoding=None, Optional[str] errors=None, Optional[str] newline=None, *Optional[int] total=None, str description="Reading...", bool auto_refresh=True, Optional[Console] console=None, bool transient=False, Optional[Callable[[], float]] get_time=None, float refresh_per_second=10, StyleType style="bar.back", StyleType complete_style="bar.complete", StyleType finished_style="bar.finished", StyleType pulse_style="bar.pulse", bool disable=False) |
| ContextManager[BinaryIO] | open (Union[str, "PathLike[str]", bytes] file, Literal["rb"] mode, int buffering=-1, Optional[str] encoding=None, Optional[str] errors=None, Optional[str] newline=None, *Optional[int] total=None, str description="Reading...", bool auto_refresh=True, Optional[Console] console=None, bool transient=False, Optional[Callable[[], float]] get_time=None, float refresh_per_second=10, StyleType style="bar.back", StyleType complete_style="bar.complete", StyleType finished_style="bar.finished", StyleType pulse_style="bar.pulse", bool disable=False) |
| Union[ContextManager[BinaryIO], ContextManager[TextIO]] | open (Union[str, "PathLike[str]", bytes] file, Union[Literal["rb"], Literal["rt"], Literal["r"]] mode="r", int buffering=-1, Optional[str] encoding=None, Optional[str] errors=None, Optional[str] newline=None, *Optional[int] total=None, str description="Reading...", bool auto_refresh=True, Optional[Console] console=None, bool transient=False, Optional[Callable[[], float]] get_time=None, float refresh_per_second=10, StyleType style="bar.back", StyleType complete_style="bar.complete", StyleType finished_style="bar.finished", StyleType pulse_style="bar.pulse", bool disable=False) |
Variables | |
| TaskID = NewType("TaskID", int) | |
| ProgressType = TypeVar("ProgressType") | |
| GetTimeCallable = Callable[[], float] | |
| _I = typing.TypeVar("_I", TextIO, BinaryIO) | |
| syntax | |
| table = Table("foo", "bar", "baz") | |
| list | progress_renderables |
| examples = cycle(progress_renderables) | |
| console = Console(record=True) | |
| transient | |
| task1 = progress.add_task("[red]Downloading", total=1000) | |
| task2 = progress.add_task("[green]Processing", total=1000) | |
| task3 = progress.add_task("[yellow]Thinking", total=None) | |
| advance | |
| ContextManager[BinaryIO] open | ( | Union[str, "PathLike[str]", bytes] | file, |
| Literal["rb"] | mode, | ||
| int | buffering = -1, |
||
| Optional[str] | encoding = None, |
||
| Optional[str] | errors = None, |
||
| Optional[str] | newline = None, |
||
| *Optional[int] | total = None, |
||
| str | description = "Reading...", |
||
| bool | auto_refresh = True, |
||
| Optional[Console] | console = None, |
||
| bool | transient = False, |
||
| Optional[Callable[[], float]] | get_time = None, |
||
| float | refresh_per_second = 10, |
||
| StyleType | style = "bar.back", |
||
| StyleType | complete_style = "bar.complete", |
||
| StyleType | finished_style = "bar.finished", |
||
| StyleType | pulse_style = "bar.pulse", |
||
| bool | disable = False |
||
| ) |
Definition at line 385 of file progress.py.
| Union[ContextManager[BinaryIO], ContextManager[TextIO]] open | ( | Union[str, "PathLike[str]", bytes] | file, |
| Union[Literal["rb"], Literal["rt"], Literal["r"]] | mode = "r", |
||
| int | buffering = -1, |
||
| Optional[str] | encoding = None, |
||
| Optional[str] | errors = None, |
||
| Optional[str] | newline = None, |
||
| *Optional[int] | total = None, |
||
| str | description = "Reading...", |
||
| bool | auto_refresh = True, |
||
| Optional[Console] | console = None, |
||
| bool | transient = False, |
||
| Optional[Callable[[], float]] | get_time = None, |
||
| float | refresh_per_second = 10, |
||
| StyleType | style = "bar.back", |
||
| StyleType | complete_style = "bar.complete", |
||
| StyleType | finished_style = "bar.finished", |
||
| StyleType | pulse_style = "bar.pulse", |
||
| bool | disable = False |
||
| ) |
Read bytes from a file while tracking progress.
Args:
path (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
buffering (int): The buffering strategy to use, see :func:`io.open`.
encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`
total: (int, optional): Total number of bytes to read. Must be provided if reading from a file handle. Default for a path is os.stat(file).st_size.
description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
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.finished".
pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
disable (bool, optional): Disable display of progress.
encoding (str, optional): The encoding to use when reading in text mode.
Returns:
ContextManager[BinaryIO]: A context manager yielding a progress reader.
Definition at line 409 of file progress.py.
References i.
| ContextManager[TextIO] open | ( | Union[str, "PathLike[str]", bytes] | file, |
| Union[Literal["rt"], Literal["r"]] | mode, | ||
| int | buffering = -1, |
||
| Optional[str] | encoding = None, |
||
| Optional[str] | errors = None, |
||
| Optional[str] | newline = None, |
||
| *Optional[int] | total = None, |
||
| str | description = "Reading...", |
||
| bool | auto_refresh = True, |
||
| Optional[Console] | console = None, |
||
| bool | transient = False, |
||
| Optional[Callable[[], float]] | get_time = None, |
||
| float | refresh_per_second = 10, |
||
| StyleType | style = "bar.back", |
||
| StyleType | complete_style = "bar.complete", |
||
| StyleType | finished_style = "bar.finished", |
||
| StyleType | pulse_style = "bar.pulse", |
||
| bool | disable = False |
||
| ) |
Definition at line 360 of file progress.py.
| Iterable[ProgressType] track | ( | Union[Sequence[ProgressType], Iterable[ProgressType]] | sequence, |
| str | description = "Working...", |
||
| Optional[float] | total = None, |
||
| bool | auto_refresh = True, |
||
| Optional[Console] | console = None, |
||
| bool | transient = False, |
||
| Optional[Callable[[], float]] | get_time = None, |
||
| float | refresh_per_second = 10, |
||
| StyleType | style = "bar.back", |
||
| StyleType | complete_style = "bar.complete", |
||
| StyleType | finished_style = "bar.finished", |
||
| StyleType | pulse_style = "bar.pulse", |
||
| float | update_period = 0.1, |
||
| bool | disable = False, |
||
| bool | show_speed = True |
||
| ) |
Track 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.finished".
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.
show_speed (bool, optional): Show speed if total isn't known. Defaults to True.
Returns:
Iterable[ProgressType]: An iterable of the values in the sequence.
Definition at line 103 of file progress.py.
References i.
| ContextManager[BinaryIO] wrap_file | ( | BinaryIO | file, |
| int | total, | ||
| *str | description = "Reading...", |
||
| bool | auto_refresh = True, |
||
| Optional[Console] | console = None, |
||
| bool | transient = False, |
||
| Optional[Callable[[], float]] | get_time = None, |
||
| float | refresh_per_second = 10, |
||
| StyleType | style = "bar.back", |
||
| StyleType | complete_style = "bar.complete", |
||
| StyleType | finished_style = "bar.finished", |
||
| StyleType | pulse_style = "bar.pulse", |
||
| bool | disable = False |
||
| ) |
Read bytes from a file while tracking progress.
Args:
file (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
total (int): Total number of bytes to read.
description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
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.finished".
pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
disable (bool, optional): Disable display of progress.
Returns:
ContextManager[BinaryIO]: A context manager yielding a progress reader.
Definition at line 294 of file progress.py.
References i.
|
protected |
Definition at line 60 of file progress.py.
| advance |
Definition at line 1698 of file progress.py.
Referenced by _Reader.__next__(), _Reader.read(), _Reader.readinto(), _Reader.readline(), _Reader.readlines(), _TrackThread.run(), and Progress.track().
| console = Console(record=True) |
Definition at line 1683 of file progress.py.
| examples = cycle(progress_renderables) |
Definition at line 1681 of file progress.py.
| GetTimeCallable = Callable[[], float] |
Definition at line 57 of file progress.py.
| list progress_renderables |
Definition at line 1667 of file progress.py.
| ProgressType = TypeVar("ProgressType") |
Definition at line 55 of file progress.py.
| syntax |
Definition at line 1648 of file progress.py.
| table = Table("foo", "bar", "baz") |
Definition at line 1664 of file progress.py.
| task1 = progress.add_task("[red]Downloading", total=1000) |
Definition at line 1693 of file progress.py.
| task2 = progress.add_task("[green]Processing", total=1000) |
Definition at line 1694 of file progress.py.
Definition at line 1695 of file progress.py.
| TaskID = NewType("TaskID", int) |
Definition at line 53 of file progress.py.
| transient |
Definition at line 1690 of file progress.py.