Zensols Utilities
Command line, configuration and persistence utilities generally used for any more than basic application. This general purpose library is small, has few dependencies, and helpful across many applications.
- See the full documentation.
- Paper on arXiv.
Some features include:
- A Hydra or Java Spring like application level support for configuration than configparser.
- Construct objects using configuration files (both INI and YAML).
- Parse primitives, dictionaries, file system objects, instances of classes.
- A command action library using an action mnemonic to invocation of a handler that is integrated with a the configuration API. This supports long and short GNU style options as provided by optparse.
- Streamline in memory and on disk persistence.
- Multi-processing work with a persistence layer.
A secondary goal of the API is to make prototyping Python code quick and easy using the REPL. Examples include reloading modules in the configuration factory.
Documentation
- Full documentation
- Configuration: powerful but simple configuration system much like Hydra or Java Spring
- Command line: automagically creates a fully functional command with help from a Python dataclass
- Persistence: cache intermediate data(structures) to the file system
- API reference
Obtaining
The easiest way to install the command line program is via the pip
installer:
pip3 install zensols.util
Template
The easiest to get started is to template out this project is to create your own boilerplate project with the mkproj
utility. This requires a Java installation, and easy to create a Python boilerplate with the following commands:
# clone the boilerplate repo
git clone https://github.com/plandes/template
# download the boilerplate tool
wget https://github.com/plandes/clj-mkproj/releases/download/v0.0.7/mkproj.jar
# create a python template and build it out
java -jar mkproj.jar config -s template/python
java -jar mkproj.jar
This creates a project customized with your organization's name, author, and other details about the project. In addition, it also creates a sample configuration file and command line that is ready to be invoked by either a Python REPL or from the command line via GNU make.
If you don't want to bother installing this program, the following sections have generated code as examples from which you can copy/paste.
Citation
If you use this project in your research please use the following BibTeX entry:
@article{Landes_DiEugenio_Caragea_2021,
title={DeepZensols: Deep Natural Language Processing Framework},
url={http://arxiv.org/abs/2109.03383},
note={arXiv: 2109.03383},
journal={arXiv:2109.03383 [cs]},
author={Landes, Paul and Di Eugenio, Barbara and Caragea, Cornelia},
year={2021},
month={Sep}
}
Changelog
An extensive changelog is available here.
License
Copyright (c) 2020 - 2021 Paul Landes