@@ -127,61 +127,80 @@ Alternatively, the progress can be tracked via the equivalent generator function
127127##### ProgBar
128128
129129* `ProgBar(iterations, track_time=True, width=30, bar_char='#',
130- stream=2, title='', monitor=False, update_interval=None))`*
130+ stream=2, title='', monitor=False, update_interval=None, email=False ))`*
131131
132- - iterations : ` int `
132+ - iterations : ` int `
133133 Number of iterations for the iterative computation.
134- - track_time : ` bool ` (default: ` True ` )
134+ - track_time : ` bool ` (default: ` True ` )
135135 Prints elapsed time when loop has finished.
136- - width : ` int ` (default: 30)
136+ - width : ` int ` (default: 30)
137137 Sets the progress bar width in characters.
138- - stream : ` int ` (default: 2).
138+ - stream : ` int ` (default: 2).
139139 Setting the output stream.
140140 Takes ` 1 ` for stdout, ` 2 ` for stderr, or a custom stream object
141- - title : ` str ` (default: ` '' ` )
141+ - title : ` str ` (default: ` '' ` )
142142 Setting a title for the progress bar.
143- - monitor : ` bool ` (default: ` False ` )
143+ - monitor : ` bool ` (default: ` False ` )
144144 Monitors CPU and memory usage if ` True ` (requires ` psutil ` package).
145- - update_interval : float or int (default: ` None ` )
145+ - update_interval : float or int (default: ` None ` )
146146 The update_interval in seconds controls how often the progress
147147 is flushed to the screen.
148148 Automatic mode if ` update_interval=None ` .
149+ - email : ` bool ` (default: False)
150+ If ` True ` sends an email notification after finishing the task
149151
150152##### ProgPercent
151153
152154* `ProgPercent(iterations, track_time=True,
153- stream=2, title='', monitor=False, update_interval=None)`*
155+ stream=2, title='', monitor=False, update_interval=None, email=False )`*
154156
155- - iterations : ` int `
156- Number of iterations for the iterative computation.
157- - track_time : ` bool ` (default: ` True ` )
157+ - iterations : ` int `
158+ Number of iterations for the iterative computation.
159+ - track_time : ` bool ` (default: ` True ` )
158160 Prints elapsed time when loop has finished.
159- - stream : ` int ` (default: 2).
161+ - stream : ` int ` (default: 2).
160162 Setting the output stream.
161163 Takes ` 1 ` for stdout, ` 2 ` for stderr, or a custom stream object
162- - title : ` str ` (default : ` '' ` ).
164+ - title : ` str ` (default : ` '' ` ).
163165 Setting a title for the percentage indicator.
164- - monitor : ` bool ` (default: ` False ` )
166+ - monitor : ` bool ` (default: ` False ` )
165167 Monitors CPU and memory usage if ` True ` (requires ` psutil ` package).
166- - update_interval : float or int (default: ` None ` )
168+ - update_interval : float or int (default: ` None ` )
167169 The update_interval in seconds controls how often the progress
168170 is flushed to the screen.
169171 Automatic mode if ` update_interval=None ` .
172+ - email : ` bool ` (default: False)
173+ If ` True ` sends an email notification after finishing the task
170174
171175##### update method
172176
173177* ` update(iterations=1, item_id=None, force_flush=False) ` *
174178
175- - iterations : int (default: ` 1 ` )
179+ - iterations : int (default: ` 1 ` )
176180 default argument can be changed to integer values
177181 ` >=1 ` in order to update the progress indicators more than once
178182 per iteration.
179- - item_id : str (default: ` None ` )
183+ - item_id : str (default: ` None ` )
180184 Print an item_id sring behind the progress bar
181- - force_flush : bool (default: ` False ` )
185+ - force_flush : bool (default: ` False ` )
182186 If True, flushes the progress indicator to the output screen
183187 in each iteration.
184188
189+
190+
191+ ##### Enable email notifications
192+
193+ * ` pyprind.setup_email(smtp_server, smtp_port, username, password) ` *
194+
195+ - smtp_server : str
196+ - smtp_port : int
197+ - username : str
198+ your full email username example (pyprind@pyprind.com )
199+ - password : str
200+ your password
201+
202+ If you want to use email notifications you can call function * ` pyprind.setup_email ` * only once and it will create an encrypted file with your email config and will be using it, if you want to change the email config just call * ` pyprind.setup_email ` * with new parameters and it will rewrite the email config file.
203+
185204<br >
186205
187206
0 commit comments