RUTIFU - Random Utilities That I Find Useful
Project description
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")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rutifu-0.0.7.tar.gz
(15.2 kB
view details)
Built Distribution
rutifu-0.0.7-py3-none-any.whl
(16.0 kB
view details)
File details
Details for the file rutifu-0.0.7.tar.gz
.
File metadata
- Download URL: rutifu-0.0.7.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40c7db4283dc5ab26f178f5c1f8a8b60e36fa39c1e5d6a50aa7ff1e912372326 |
|
MD5 | b7bf5abd7e65cf6d8e8b7ee37520e609 |
|
BLAKE2b-256 | 7b378f78d46336f410350cae934568c298b01e17efd51770a55fd41e787e4051 |
File details
Details for the file rutifu-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: rutifu-0.0.7-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b71cb73f26dc148e85dbbcf4eb0f2a02264b6add66a85aeaea7a2248ecdad46 |
|
MD5 | 53bc000b8336ace6d8f386046f133119 |
|
BLAKE2b-256 | 65deb57fd69950a04f2eaf36527d5d2e8ef4a3ca940ce88d2398c8f8b7aac44c |