Skip to main content

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.8.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rutifu-0.0.8-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file rutifu-0.0.8.tar.gz.

File metadata

  • Download URL: rutifu-0.0.8.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.1

File hashes

Hashes for rutifu-0.0.8.tar.gz
Algorithm Hash digest
SHA256 57e8fb006fd560207468b7913182d5e1c99b23e0a38b5b2a515110513344352a
MD5 f1a494fe89ee5eabcf195c52a3ae5bde
BLAKE2b-256 540661828b5c8913b06268185c0333489245cb42cd2f462673d90e6631de3eb7

See more details on using hashes here.

File details

Details for the file rutifu-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: rutifu-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.1

File hashes

Hashes for rutifu-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 da819c68013f210920b901b4a693bfc5af234a1187be1bcf432d8e8a888d3acb
MD5 0a5b0353bf895e440acb78c8e29a8260
BLAKE2b-256 7417577aa16968050319712cbdc752091fa413fff70a9abd7bde7698496270f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page