Metadata-Version: 2.0
Name: simplere
Version: 1.2.6
Summary: Simpler, cleaner access to regular expressions. Globs too.
Home-page: https://bitbucket.org/jeunice/simplere
Author: Jonathan Eunice
Author-email: jonathan.eunice@gmail.com
License: Apache License 2.0
Keywords: re regex regexp regular expression glob simple
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: mementos

| |travisci| |version| |downloads| |versions| |impls| |wheel| |coverage|

.. |travisci| image:: https://travis-ci.org/jonathaneunice/simplere.png?branch=master
    :alt: Travis CI build status
    :target: https://travis-ci.org/jonathaneunice/simplere

.. |version| image:: http://img.shields.io/pypi/v/simplere.png?style=flat
    :alt: PyPI Package latest release
    :target: https://pypi.python.org/pypi/simplere

.. |downloads| image:: http://img.shields.io/pypi/dm/simplere.png?style=flat
    :alt: PyPI Package monthly downloads
    :target: https://pypi.python.org/pypi/simplere

.. |versions| image:: https://img.shields.io/pypi/pyversions/simplere.svg
    :alt: Supported versions
    :target: https://pypi.python.org/pypi/simplere

.. |impls| image:: https://img.shields.io/pypi/implementation/simplere.svg
    :alt: Supported implementations
    :target: https://pypi.python.org/pypi/simplere

.. |wheel| image:: https://img.shields.io/pypi/wheel/simplere.svg
    :alt: Wheel packaging support
    :target: https://pypi.python.org/pypi/simplere

.. |coverage| image:: https://img.shields.io/badge/test_coverage-100%25-6600CC.svg
    :alt: Test line coverage
    :target: https://pypi.python.org/pypi/simplere


A simplified interface to Python's regular expression (``re``) string
search. Eliminates steps and provides simpler access to results. As a bonus,
also provides compatible way to access Unix glob searches.

Usage
=====

Python regular expressions are powerful, but the language's lack
of an *en passant* (in passing) assignment requires a preparatory
motion and then a test::

    import re

    match = re.search(pattern, some_string)
    if match:
        print match.group(1)

With ``simplere``, you can do it in fewer steps::

    from simplere import *

    if match / re.search(pattern, some_string):
        print match[1]

That's particularly valuable in complex search-and-manipulate
code that requires multiple levels of searching along with
pre-conditions, error checking, and post-match cleanup, formatting,
and actions.

As a bonus,
``simplere`` also provides simple glob access.::

    if 'globtastic' in Glob('glob*'):
        print "Yes! It is!"
    else:
        raise ValueError('OH YES IT IS!')

It can also conveniently match against multiple glob
patterns, and/or do case-insensitive glob searches.

See `Read the Docs <http://simplere.readthedocs.org/en/latest/>`_
for the full installation and usage documentation.

Notes
=====

* Version 1.2.6 bumps test coverage to 100%.

* Version 1.2.5 added automated measurement of test coverage. Line coverage
  started at 92%. Bumped to 97%.

* Version 1.2 extends auto-imported symbols. Previously
  overly restrictive, requiring clients of module
  to needlessly (and contra docs) manually import ``re`` and construct
  the ``match`` object.  Fixed.  Bumped minor version number to reflect
  *de facto* API change.

* Version 1.1 adds multi-pattern and case insensitive Glob subclass.
  Added wheel packaging. Rearranged and extended testing structure.
  Updated setup and docs.

* See ``CHANGES.rst`` for a fuller historical view of changes.

* Automated multi-version testing managed with `pytest
  <http://pypi.python.org/pypi/pytest>`_ and `tox
  <http://pypi.python.org/pypi/tox>`_. Continuous integration testing
  with `Travis-CI <https://travis-ci.org/jonathaneunice/intspan>`_.
  Packaging linting with `pyroma <https://pypi.python.org/pypi/pyroma>`_.

  Successfully packaged for, and
  tested against, all late-model versions of Python: 2.6, 2.7, 3.2, 3.3,
  3.4, and 3.5 pre-release (3.5.0b3) as well as PyPy 2.6.0 (based on
  2.7.9) and PyPy3 2.4.0 (based on 3.2.5).

* The author, `Jonathan Eunice <mailto:jonathan.eunice@gmail.com>`_ or
  `@jeunice on Twitter <http://twitter.com/jeunice>`_
  welcomes your comments and suggestions.


Installation
============

To install or upgrade to the latest version::

    pip install -U simplere

To ``easy_install`` under a specific Python version (3.3 in this example)::

    python3.3 -m easy_install --upgrade simplere

(You may need to prefix these with ``sudo`` to authorize
installation. In environments without super-user privileges, you may want to
use ``pip``'s ``--user`` option, to install only for a single user, rather
than system-wide.)


