package tqdm

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
module Style : sig ... end
module Options : sig ... end
val create : ?options:Options.t -> int -> t

create ?options total creates a new progress bar tied to stdout. The bar reaches 100% when update is called with total.

val reset : t -> unit

reset t resets the current bar.

val update : t -> int -> unit

update t v sets the progress bar a value v, the proportion of the bar displayed is v / total where total is the value that has been used to initialize the bar. The bar is then displayed.

val incr : t -> by:int -> unit

incr t ~by increases the current value stored in t by by.

val close : t -> unit

close t finalizes the bar and prints a new line.

val with_bar : ?options:Options.t -> int -> f:(t -> 'a) -> 'a

with_bar total ~f creates a new bar and runs f using it. close is called when f returns or if f raises.