Metadata-Version: 1.1
Name: tag-expressions
Version: 0.0.0
Summary: UNKNOWN
Home-page: http://github.com/timofurrer/tag-expressions
Author: Timo Furrer
Author-email: tuxtimo@gmail.com
License: UNKNOWN
Description: tag-expressions
        ===============
        
        Package to evaluate logical tag expressions by using a modified version of the `Shunting Yard algorithm <https://en.wikipedia.org/wiki/Shunting-yard_algorithm>`_.
        This package is a Python port of cucumbers tag expression.
        
        It's also used by `radish <https://github.com/radish-bdd/radish>`_.
        
        |Build Status| |PyPI package version| |PyPI python versions|
        
        
        Installing
        ----------
        
        .. code:: bash
        
            $ pip install tag-expressions
        
        Here is a tease
        ---------------
        
        
        .. code:: python
        
            >>> from tagexpressions import parse
            >>>
            >>> expression = '( a and b ) or ( c and d )'
            >>> compiled_expression = parse(expression)
            >>> print(compiled_expression)
            ( ( a and b ) or ( c and d ) )
            >>>
            >>> data = ['a', 'b', 'c', 'd']
            >>> assert compiled_expression.evaluate(data) == True
            >>>
            >>> data = ['a', 'c']
            >>> assert compiled_expression.evaluate(data) == False
            >>>
            >>>
            >>> expression = 'not a or b and not c or not d or e and f'
            >>> compiled_expression = parse(expression)
            >>> print(compiled_expression)
            ( ( ( not ( a ) or ( b and not ( c ) ) ) or not ( d ) ) or ( e and f ) )
            >>>
            >>> data = ['b', 'e', 'f']
            >>> assert compiled_expression.evaluate(data) == True
            >>>
            >>> data = ['a', 'c', 'd']
            >>> assert compiled_expression.evaluate(data) == False
        
        
        .. |Build Status| image:: https://travis-ci.org/timofurrer/tag-expressions.png?branch=master
           :target: https://travis-ci.org/timofurrer/tag-expressions
        .. |PyPI package version| image:: https://badge.fury.io/py/tag-expressions.svg
           :target: https://badge.fury.io/py/tag-expressions
        .. |PyPI python versions| image:: https://img.shields.io/pypi/pyversions/tag-expressions.svg
           :target: https://pypi.python.org/pypi/tag-expressions
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Testing
