simple-wait
Simple wait
Example
from datetime import datetime
from simple_wait import wait
print("Start wait")
wait(seconds=5)
print("Finish wait")
while True:
print()
print("Current datetime:", datetime.now())
print()
wait(minutes=1, seconds=30)
import traceback
from simple_wait import wait
while True:
try:
# Process
...
wait(hours=8)
except:
print(traceback.format_exc())
wait(minutes=15)
Installation
You can install with:
pip install simple-wait
Install or upgrade:
pip install --upgrade simple-wait
Install or update from github:
pip install git+https://github.com/gil9red/simple-wait
Description
Parameters wait function:
| Name | Type | Default |
|---|---|---|
| days | int |
0 |
| seconds | int |
0 |
| microseconds | int |
0 |
| milliseconds | int |
0 |
| minutes | int |
0 |
| hours | int |
0 |
| weeks | int |
0 |
| progress_bar | Iterable[str] |
("|", "/", "-", "\\") |
| delay_seconds | float |
1 |
| log_pattern_progress | str |
"[{progress_bar}] Time left to wait: {left}" |
| log_pattern_cancel | str |
"\nWaiting canceled\n" |
| log_pattern_clear_line | str |
"\r" + " " * 100 + "\r" |
| log | TextIOWrapper |
sys.stdout |
| is_need_stop | Callable[[], bool] |
lambda: False |
Metadata
Release files for simple-wait 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simple-wait-1.0.8.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_wait-1.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / simple-wait-1.0.8.tar.gz
| Download URL | simple-wait-1.0.8.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9cccdde04a7c231bed51b838982364f82392cbbbec33623f56be8ac89b4ad977
|
|
BLAKE2b-256 checksum How to use checksums |
d355f0365c184030482eaa38e034449e305ffb1be794fa2817b7323386692487
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / simple_wait-1.0.8-py3-none-any.whl
| Download URL | simple_wait-1.0.8-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d001dedef5b4fe5322a4c37f3bbf82769ddf5673cb37702f6357675c91d5ea8
|
|
BLAKE2b-256 checksum How to use checksums |
8986db64611375f972254ac043e990cc3d6801e79f267c5b5c79479d91514f90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|