A collection of core functions for tool script writing
Project description
cjnfuncs - A framework and collection of utility functions for script writing
cjnfuncs is comprised of several modules (links to respective documentation)
NOTE: Since relative links to other .md files do not work on PyPI, please go to the cjnfuncs GitHub repo to read the documentation.
module | Description/Purpose |
---|---|
core | Set up the base environment |
configman | Feature-rich configuration file toolset |
timevalue | Handle time values with units, such as '5m' (5 minutes) |
mungePath | Ease-of-use pathlib extenstion for constructing and manipulating file paths |
deployfiles | Push bundled setup files within a package to the proper user/system locations |
resourcelock | Inter-process resource lock mechanism |
SMTP | Send notification and email messages |
Developed and tested on Python 3.6.8, and supported on all higher Python versions. Developed on Linux, supported also on Windows (tested on Windows 10).
In this documentation, "tool script" refers to a Python project that imports and uses cjnfuncs. Some may be simple scripts, and others may themselves be installed packages.
Installation and usage
pip install cjnfuncs
A package template using cjnfuncs is available at https://github.com/cjnaz/tool_template, which is the basis of PyPI posted tools such as:
Project repo: https://github.com/cjnaz/cjnfuncs
Revision history
- 2.1 240104 - Partitioned to separate modules. Added modify_configfile. Added native support for float, list, tuple, and dict in loadconfig(). Added getcfg() type checking. Documentation touch for logging formats in config file. Improved snd_notif failure logging. Added email/notif send retries. Added resourcelock module.
- 2.0.1 230222 - deploy_files() fix for files from package
- 2.0 230208 - Refactored and converted to installed package. Renamed funcs3 to cjnfuncs.
- ...
- 0.1 180524 - New. First github posting
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.