A library of command line utilities
Cletus is a library to help with commmand line python programs.
It includes: - cletus_config: makes it easy for a program to combine config files, environmental variables, and arguments into a single schema-validated config. - cletus_supp: allows programs and users to “suppress” actions with a program simply by touching a file in a dedicated directory. The suppression action may be to quit, or to simply sleep or temporarily suspend processing. - cletus_log: just boilerplate for common logging. - cletus_job: a well-tested mechanism that uses a pid file to ensure that the same file doesn’t get run twice.
More info is on the cletus wiki here: https://github.com/kenfar/cletus/wiki
~ $ pip install cletus $ easy_install cletus ~
Or install manually from pypi:
~ $ mkdir ~$ wget https://pypi.python.org/packages/source/d/cletus/cletus-0.1.tar.gz $ tar -xvf easy_install cletus $ cd ~-* $ python setup.py install ~
Any of: python 2.7, 3.4, 3.5 or pypy
Cletus uses the BSD license - see the separate LICENSE file for further information
Copyright 2013, 2014, 2015, 2016 Ken Farmer
v1.0.13 - 2016-05
add: minor changes tox.ini to support python 2.7, 3.4, 3.5, and pypy
v1.0.12 - 2015-09
add: silent arg to SuppressCheck() class to suppress all logging. Needed to handle logging volume when continually-checking for suppressions.
v1.0.11 - 2015-05
fix: improved defaulting
ran modernizer to make the code more python3-ready
v1.0.10 - 2015-03
fix: diminished logging
v1.0.8 - 2015-01
added tests to confirm optional column NULLs
added remove_null_overrides to simplify use
added apply_defaults to simplify use
fix: stopped putting copy of sample configs in /tmp
v1.0.6 - 2014-07
added config to setup
v1.0.5 - 2014-07
moved to script dir from example
setup changed to include archiver & config file
check suppressions directory only when the suppressions method is called, so it can be called repeatedly at checkpoints by an app.
changed suppressions method behavior to default app_name to init app_name.
v1.0.4 - 2014-07
changed to use flock exclusively rather than the pid from the pidfile and a check to see if that pid was still being used. This eliminates a big race condition.
added concurrency testing
added namespace, dictionary and env config inputs
added test harness
v1.0.1 - 2014-03
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.