Metadata-Version: 1.1
Name: python-lightblue
Version: 0.1.2
Summary: A Python API for Lightblude database.
Home-page: https://github.com/Allda/python-lightblue
Author: Ales Raszka, Mark Birger
Author-email: araszka@redhat.com, mbirger@redhat.com
License: GPLv3
Description-Content-Type: UNKNOWN
Description: Python lightblue library
        ========================
        
        |codecov.io|
        
        |Build Status|
        
        This is python library for `Lightblue <https://www.lightblue.io/>`__
        database. It can be used as API interface.
        
        Example of usage
        ----------------
        
        Levels of abstraction (from low to high):
        
        1) LightBlueEntity and LightBlueService
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
        Basic modules to query a LightBlue on a level of the request.
        
        2) LightBlueQuery
        ~~~~~~~~~~~~~~~~~
        
        Class that represents a query to LB in time (both non-executed and
        executed states). Has a relation to the LightBlueEntity.
        
        Usage example:
        
        .. code:: python
        
            LightBlueQuery(_id='hash').find()
            a = LightBlueQuery(('foo', '$neq', 'value'), bar='value2')
            a._add_to_projection('foo', recursive=['bar'])
            a._add_to_update(unset='foobar')
            a.update()
            LightBlueQuery.insert({'key': 'item'})
        
        Why \_add\_to\_projection() is private? Because we have another level of
        abstraction...
        
        3) LightBlueGenericSelection
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
        -  inherits LightBlueQuery and extends the functionality with
           post-processing, so you can call:
        
        .. code:: python
        
            LightBlueGenericSelection(foo='value').find(
                check_response=True,
                selector='/processed/0/bar/',
                count=(1, 2),
                fallback=None,
                postprocess=lambda x: x.split('.')[-1])
        
        so the query above will select documents with a specific foo value, it
        will check the successful query of a LB response and count of response
        documents of min 1 and max 2, with a fallback if it is out of range. It
        will select 'bar' from the first response item and will process it with
        the provided lambda.
        
        That level of abstraction is generic because it is not specific to an
        entity.
        
        Dependencies
        ------------
        
        -  `BeanBag <https://github.com/ajtowns/beanbag>`__
        -  `Dpath <https://github.com/akesterson/dpath-python>`__
        
        .. |codecov.io| image:: https://codecov.io/gh/Allda/python-lightblue/coverage.svg?branch=master
           :target: https://codecov.io/gh/Allda/python-lightblue?branch=master
        .. |Build Status| image:: https://travis-ci.org/Allda/python-lightblue.svg?branch=master
           :target: https://travis-ci.org/Allda/python-lightblue
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
