https://jenkins.logilab.org/job/logilab-common/badge/icon

Please note that some of the modules have some extra dependencies.

Logilab's common library

What's this ?

This package contains some modules used by different Logilab projects.

It is released under the GNU Lesser General Public License.

There is no documentation available yet but the source code should be clean and well documented.

Designed to ease:

  • handling command line options and configuration files
  • writing interactive command line tools
  • manipulation of files and character strings
  • manipulation of common structures such as graph, tree, and pattern such as visitor
  • generating text and HTML reports
  • more...

Installation

logilab-common is available on pypi so you can install it using pip

pip install logilab-common

Or alternatively extract the tarball, jump into the created directory and run

python setup.py install

For installation options, see

python setup.py install --help

Provided modules

Here is a brief description of the available modules.

Modules providing high-level features
  • :ref:`cache <cache>`, a cache implementation with a least recently used algorithm.

    ReST / HTML errors:System Message: ERROR/3 (README , line 48); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`changelog <changelog>`, a tiny library to manipulate our simplified ChangeLog file format.

    ReST / HTML errors:System Message: ERROR/3 (README , line 50); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`clcommands <clcommands>`, high-level classes to define command line programs handling different subcommands. It is based on configuration to get easy command line / configuration file handling.

    ReST / HTML errors:System Message: ERROR/3 (README , line 52); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`configuration <configuration>`, some classes to handle unified configuration from both command line (using optparse) and configuration file (using ConfigParser).

    ReST / HTML errors:System Message: ERROR/3 (README , line 56); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`proc <proc>`, interface to Linux /proc.

    ReST / HTML errors:System Message: ERROR/3 (README , line 59); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`umessage <umessage>`, unicode email support.

    ReST / HTML errors:System Message: ERROR/3 (README , line 61); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`ureports <ureports>`, micro-reports, a way to create simple reports using python objects without care of the final formatting. ReST and html formatters are provided.

    ReST / HTML errors:System Message: ERROR/3 (README , line 63); <em>backlink</em></p>

    Unknown interpreted text role "ref".

Modules providing low-level functions and structures
  • :ref:`compat <compat>`, provides a transparent compatibility layer between different python versions.

    ReST / HTML errors:System Message: ERROR/3 (README , line 70); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`date <date>`, a set of date manipulation functions.

    ReST / HTML errors:System Message: ERROR/3 (README , line 73); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`daemon <daemon>`, a daemon function and mix-in class to properly start an Unix daemon process.

    ReST / HTML errors:System Message: ERROR/3 (README , line 75); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`decorators <decorators>`, function decorators such as cached, timed...

    ReST / HTML errors:System Message: ERROR/3 (README , line 78); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`deprecation <deprecation>`, decorator, metaclass & all to mark functions / classes as deprecated or moved

    ReST / HTML errors:System Message: ERROR/3 (README , line 80); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`fileutils <fileutils>`, some file / file path manipulation utilities.

    ReST / HTML errors:System Message: ERROR/3 (README , line 83); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`graph <graph>`, graph manipulations functions such as cycle detection, bases for dot file generation.

    ReST / HTML errors:System Message: ERROR/3 (README , line 85); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`modutils <modutils>`, python module manipulation functions.

    ReST / HTML errors:System Message: ERROR/3 (README , line 88); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`shellutils <shellutils>`, some powerful shell like functions to replace shell scripts with python scripts.

    ReST / HTML errors:System Message: ERROR/3 (README , line 90); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`tasksqueue <tasksqueue>`, a prioritized tasks queue implementation.

    ReST / HTML errors:System Message: ERROR/3 (README , line 93); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`textutils <textutils>`, some text manipulation functions (ansi colorization, line wrapping, rest support...).

    ReST / HTML errors:System Message: ERROR/3 (README , line 95); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`tree <tree>`, base class to represent tree structure, and some others to make it works with the visitor implementation (see below).

    ReST / HTML errors:System Message: ERROR/3 (README , line 98); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`visitor <visitor>`, a generic visitor pattern implementation.

    ReST / HTML errors:System Message: ERROR/3 (README , line 101); <em>backlink</em></p>

    Unknown interpreted text role "ref".

Modules extending some standard modules
  • :ref:`debugger <debugger>`, pdb customization.

    ReST / HTML errors:System Message: ERROR/3 (README , line 107); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`logging_ext <logging_ext>`, extensions to logging module such as a colorized formatter and an easier initialization function.

    ReST / HTML errors:System Message: ERROR/3 (README , line 109); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`optik_ext <optik_ext>`, defines some new option types (regexp, csv, color, date, etc.) for optik / optparse

    ReST / HTML errors:System Message: ERROR/3 (README , line 112); <em>backlink</em></p>

    Unknown interpreted text role "ref".

Modules extending some external modules
  • :ref:`sphinx_ext <sphinx_ext>`, Sphinx_ plugin defining a autodocstring directive.

    ReST / HTML errors:System Message: ERROR/3 (README , line 119); <em>backlink</em></p>

    Unknown interpreted text role "ref".

  • :ref:`vcgutils <vcgutils>` , utilities functions to generate file readable with Georg Sander's vcg tool (Visualization of Compiler Graphs).

    ReST / HTML errors:System Message: ERROR/3 (README , line 121); <em>backlink</em></p>

    Unknown interpreted text role "ref".

To be deprecated modules

Those logilab.common modules will much probably be deprecated in future versions:

  • testlib: use `unittest2`_ instead
  • interface: use `zope.interface`_ if you really want this
  • table, xmlutils: is that used?
  • sphinxutils: we won't go that way imo (i == syt)

Building the documentation

Create a virtualenv and install dependencies

virtualenv venv
source venv/bin/activate

# you need the krb5-config command to build all dependencies
# on debian you can get it using "apt-get install libkrb5-dev"

pip install doc/requirements-doc.txt

# install logilab-common
pip install -e .

Then build the doc

cd doc
make html

It's now available under doc/_build/html/

Comments, support, bug reports

Project page https://www.logilab.org/project/logilab-common

Use the cubicweb-devel at lists.cubicweb.org mailing list.

You can subscribe to this mailing list at https://lists.cubicweb.org/mailman/listinfo/cubicweb-devel

Archives are available at https://lists.cubicweb.org/pipermail/cubicweb-devel/

Docutils System Messages

ReST / HTML errors:System Message: ERROR/3 (README , line 119); <em>backlink</em></p>
Unknown target name: "sphinx".
ReST / HTML errors:System Message: ERROR/3 (README , line 131); <em>backlink</em></p>
Unknown target name: "unittest2".
ReST / HTML errors:System Message: ERROR/3 (README , line 132); <em>backlink</em></p>
Unknown target name: "zope.interface".
source repositorylogilab-common repository
test environmentcommon env
owned bysthenault
may be discussed onpython-projects
use licenseLGPL
tagged by
similar entities