Metadata-Version: 1.1
Name: kenji
Version: 0.2.1
Summary: simple sqlite-backed graph datastore
Home-page: http://github.com/eugene-eeo/kenji
Author: Eugene Eeo
Author-email: packwolf58@gmail.com
License: MIT
Description: kenji
        =====
        
        |Build|
        |Coverage|
        |Version|
        
        A simple, direct-edge, sqlite backed persistent
        social graph datastore similar in design to Twitter's
        flockdb_, built in and built for Python meant, for
        small apps that do not require a full blown graph
        database like Neo4j or FlockDB, and for apps that
        are interested in direct edges only.
        
        
        Runthrough
        ----------
        
        .. code-block:: python
        
            >>> from kenji.graph import Graph, V
            >>> g = Graph(graphs=['follows'], mappings={'person':['knows']})
            >>> g.store(V(1).follows(2))
        
        Let's look at some queries we can do to the data
        above. Let's see who node 1 follows and who
        follows node 2.
        
        .. code-block:: python
        
            >>> assert g.exists(V(1).knows(2))
            >>> assert 2 == g.select(V(1).follows).first
            >>> assert 1 == g.select(V().follows(1)).first
            >>> g.relation_between('person', V(1)(2))
            ['follows']
        
        Like **flockdb**, kenji graphs cannot be traversed
        nor are they be optimized for traversal. I might add
        this feature if there is a need for it in the
        future. For now they are strictly adjacency lists
        due to the immense performance boost gained from
        storing them like that.
        
        Persistence is based on an ``sqlite3`` backend,
        and it also supports graph traversal on multiple
        edges instead of direct edges. Nodes are stored
        as and can only be *positive* integers. Currently
        I'm considering if I should support pluggable
        backends, i.e. to support Postgres, MySQL, MongoDB,
        etc.
        
        
        Installation
        ------------
        
        To install Kenji, simply:
        
        .. code-block:: sh
        
            $ pip install kenji
        
        
        Features
        ---------
        
        - **small codebase:** Only the necessities are
          included (which makes for a very small 48KB
          including tests), the rest is left up to the
          developer to implement/figure out on their
          own. This also cuts down the amount of bugs
          within the core codebase and allows us to
          reach 90-100% test coverage.
        
        - **sqlite backed:** Using an SQL backend means
          that performance can be easily tuned to fit your
          needs/usage patterns. For example you can always
          drop down to the SQL level using ``Graph.db``.
        
        - **fast and fun:** Kenji's API is optimized for
          developer happiness, and also quite performant.
          Using the expressive ``V`` object for querying,
          storing and representing edges it will make your
          life a breeze.
        
        - **specific:** Kenji aims to solve specific
          problems and adhere to specific use cases, and
          therefore the API isn't too big. Use Kenji to
          store your relations between documents, and use
          a document store (such as tinydb_) to store the
          documents themselves.
        
        
        .. _tinydb: https://github.com/msiemens/tinydb
        .. _flockdb: http://github.com/twitter/flockdb
        .. |Build| image:: http://img.shields.io/travis/eugene-eeo/kenji.svg?style=flat
           :target: https://travis-ci.org/eugene-eeo/kenji
        .. |Coverage| image:: http://img.shields.io/coveralls/eugene-eeo/kenji.svg?style=flat
           :target: https://coveralls.io/r/eugene-eeo/kenji
        .. |Version| image:: http://img.shields.io/pypi/v/kenji.svg?style=flat
           :target: https://pypi.python.org/pypi/kenji
        
Keywords: database graph
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Database
Classifier: Topic :: Database :: Database Engines/Servers
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Operating System :: OS Independent
