RUTIFU - Random Utilities That I Find Useful
This is a set of Python routines that perform various functions that I find useful for multiple projects.
Logging and debugging
Log a message to syslog or stdout
log(*args)
Log the traceback for an exception
logException(name, ex)
Log a debug message conditioned on a specified global variable
debug(*args)
Threads and processes
Thread object that logs a stack trace if there is an uncaught exception
class LogThread(threading.Thread)
Convenience function to create and start a thread
startThread(name, target, **kwargs)
Block a thread indefinitely
block()
Wait until the network is available
waitForDns(host)
Manipulation of strings and lists
Transform a string of words into a camel case name
camelize(words)
Create a string of words from a camel case name
labelize(name)
Get the value of a json item from a file
getValue(fileName, item)
Turn an item into a list if it is not already
listize(x)
Truncate or pad a list into a fixed number of items
fixedList(items, nItems, pad=None)
Format an E.164 phone number for display
displayNumber(number)
Format a phone number as E.164
e164number(number, defaultAreaCode="", defaultCountryCode="1")
Release files for rutifu 0.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 | |
|---|---|---|---|
| rutifu-0.0.8.tar.gz | 15.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rutifu-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.4 kB
Release files / rutifu-0.0.8.tar.gz
| Download URL | rutifu-0.0.8.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57e8fb006fd560207468b7913182d5e1c99b23e0a38b5b2a515110513344352a
|
|
BLAKE2b-256 checksum How to use checksums |
540661828b5c8913b06268185c0333489245cb42cd2f462673d90e6631de3eb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.1
|
Release files / rutifu-0.0.8-py3-none-any.whl
| Download URL | rutifu-0.0.8-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da819c68013f210920b901b4a693bfc5af234a1187be1bcf432d8e8a888d3acb
|
|
BLAKE2b-256 checksum How to use checksums |
7417577aa16968050319712cbdc752091fa413fff70a9abd7bde7698496270f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.1
|