This is a collection of utility modules for Python projects.
batchesmodule:Support batches, generating (items, label) tuples
buildoutmodule, for buildout-built projects:Function
checkPathForPackageto check a given package against a versions whitelist. Useful if you like to constrain the versions of that package without actually requiring it.codingmodule:Factory functions to create
safe_encoderesp.safe_decodefunctions as neededclassesmodule:Several simple but useful classes derived from Python dicts, e.g.
MirrorandProxycsvfilesmodule:- provides an
excel_ssvdialect (semicolon-separated)
- provides an
datesmodule:- parse dates, supporting multiple formats
debugmodule:trace_thisdecorator
dictsmodule:- several tools to work with standard dictionaries
filesmodule:- functions related to files; for now
make_mtime_checker
- functions related to files; for now
htmlohmymodule:HtmlEntityProxy- a dict which returns unicode characters when given a named HTML entity
(This module was named ``html`` in earlier releases up to 1.3.x but was renamed due to import problems in Python 3.)
httpmodule:extract_hostname(usingurl.splitand raisingValueError)
lands0module:- several tools to work with lists and strings
lockmodule:- provide the ConvenientLock LockFile context manager, based on
zc.lockfile_; specify the
lockextra to install the dependencies.
- provide the ConvenientLock LockFile context manager, based on
zc.lockfile_; specify the
minicurrmodule:- pretty minimal currency-related stuff
minifuncsmodule:- very small functions, for some cases where functions are used as arguments
profilemodule:- a
StopWatchcontext manager and@profiledecorator
- a
sequencesmodule:- tools for sequences, e.g.
inject_indexes
- tools for sequences, e.g.
sqlmodule:functions for the generation of SQL statements, including insert, update, delete and select.
The visaplan.zope.reldb package has a copy of this module which uses the SQLAlchemy placeholders convention (
:name).
timesmodule:- functions related to date and/or time calculations
wordsmodule:- A head function to extract the first N characters or words, trying to avoid breaking words (strictly heuristically, for now).
The modules are documented by doctests. Apart from this, we don't have real user documentation yet (sorry).
Some of the docstrings are written in German.
Simply install visaplan.tools by using pip:
pip install visaplan.tools
or by adding it to your buildout:
[buildout]
...
eggs =
visaplan.tools
and then running bin/buildout
- Issue Tracker: https://github.com/visaplan/visaplan.tools/issues
- Source Code: https://github.com/visaplan/visaplan.tools
If you are having issues, please let us know; please use the issue tracker mentioned above.
The project is licensed under the GNU General Public License v2 (GPLv2).