Utils used by GetMoney Inc.
Project description
GetMoney Inc. Utils
gmi_exception
Exceptions caused by GMI must be instances of GmiException:
# using plain GmiException
if is_something_bad_happened:
raise GmiException('something bad happened!')
# using child of GmiException
class MyGmiException(GmiException):
# your code...
pass
if is_something_bad_happened_inside_lib:
raise MyGmiException('something bad happened inside my lib!')
interval
call_repeatedly
stop_func = call_repeatedly(timeout, func, *args) starts calling
func(*args) every timeout seconds in different thread. It also
returns func that will stop this behaviour.
def bla_bla(last_bla: str):
print(f"bla bla {last_bla}")
stop_func = call_repeatedly(1., bla_bla, "BLA!")
time.sleep(2.5)
stop_func()
# will print:
# bla bla BLA!
# bla bla BLA!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gmi_utils-0.1.10.tar.gz
(2.1 kB
view details)
File details
Details for the file gmi_utils-0.1.10.tar.gz.
File metadata
- Download URL: gmi_utils-0.1.10.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5141228e5bfe4f435168ffba7a5544fea88b93799a03b1be77c04d19148ea291
|
|
| MD5 |
04def6ade8ddcbb0a6f5f4d6d0e4c5e6
|
|
| BLAKE2b-256 |
967fc84f1243bc4c547b2ce77dfc9d9ea04487d8f8317bd081ed14e23cf2dda5
|