I am proud to announce the first alpha release of Booleano, an interpreter of boolean expressions, a library to define and run filters available as text (e.g., in a natural language) or in Python code.
In order to handle text-based filters, Booleano ships with a fully- featured parser whose grammar is adaptive: Its properties can be overridden using simple configuration directives. This parser is powered by Pyparsing. On the other hand, the library exposes a pythonic API for filters written in pure Python. These filters are particularly useful to build reusable conditions from objects provided by a third party library. It's been designed to address the following use cases: 1.- Convert text-based conditions: When you need to turn a condition available as plain text into something else (i.e., another filter). 2.- Evaluate text-based conditions: When you have a condition available as plain text and need to iterate over items in order to filter out those for which the evaluation of the condition is not successful. 3.- Evaluate Python-based conditions: When you have a condition represented by a Python object (nothing to be parsed) and need to iterate over items in order to filter out those for which the evaluation of the condition is not successful. Website: http://code.gustavonarea.net/booleano/ I hope you'll like it! Comments are most welcome :) -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/