lck.common 0.4.5 documentation
This library consists of various simple common routines and language constructs that are so useful they ten to be rewritten in every subsequent project I’m working on. Each function, decorator or module on its own is too simple to dedicate an entire PyPI package for it. Together however, this library represents a Swiss army knife for everyday needs (YMMV). Among the things you might find inside:
- robust memoization
- some less obvious collections (e.g.
orderedset
)- a
@synchronized
decorator (with threading or lockfile backends)- some controversial language enhancements like the Null object
- converter from ElementTree instances to dicts
- file finder (searching locations commonly used for storing app data)
The latest version can be installed via PyPI:
$ pip install lck.common
or:
$ easy_install lck.common
The source code repository and issue tracker are maintained on GitHub.
For the curious, lck
stands for LangaCore Kit. LangaCore is a one man
software development shop of mine.
Note: lck.common
requires Python 2.7 because all of its code is using
the so-called four futures (absolute_imports
, division
, print_function
and unicode_literals
). One of the virtues in the creation of this library
is to make the code beautiful. These switches give a useful transitional
state between the old Python 2.x and the new Python 3.x. You should use them as
well.
lck.git
introduced with a get_version
routinedecode_entities
added to lck.xml
lck.lang.Null
introduced, see Null Object patternlck.lang.unset
is now a Null
instancelck.xml
introduced with a etree_to_dict
routinelck.config
has been removed, use the configparser backportlck.crypto
introduced with a couple of thin wrappers over PyCryptolck.math
introduced starting with Elo rating calculation routine.lck.lang.unset
is now also False
and len(unset)
is zerolck
namespace from langacore.kit