sqlamp /

Full commit
#!/usr/bin/env python
`sqlamp` -- Materialized Path for SQLAlchemy

`sqlamp` is an implementation of an efficient algorithm for working
with hierarchical data structures -- `Materialized Path`. `sqlamp`
uses (and depends of) `SQLAlchemy <>`_.

`Materialized Path` is a way to store (and fetch) a trees in a relational
databases. It is the compromise between `Nested Sets` and `Adjacency
Relations` in respect to simplicity and efficiency. Method was promoted
by `Vadim Tropashko`_ in his book `SQL Design Patterns`_. Vadim's
description of the method can be read in his article `Trees in SQL:
Nested Sets and Materialized Path (by Vadim Tropashko)`_.

Implemented features:

    * Setting up with ``declarative.ext`` or without it.
    * Saving node roots -- if no parent set for node.
    * Saving child nodes -- if node has some parent. The whole dirty job
      of setting values in utility fields is done by `sqlamp`.
    * Fetching node's descendants, ancestors and children using the most
      efficient way available.
    * Autochecking exhaustion of tree size limits (maximum number of
      children and maximum nesting level) is done during session flush.
    * Rebuilding all trees and any subtree on the basis of Adjacency
    * Collapsing flat tree returned from query to recursive structure.
    * Node classes may use polymorphic inheritance.
    * Nodes and whole trees/subtrees can be moved around or removed

Known-to-work supported DBMS include `sqlite`_ (tested with 3.6.14),
`MySQL`_ (tested using both MyISAM and InnoDB with server version 5.1.34)
and `PostgreSQL`_ (tested with 8.3.7), but sqlamp should work with any
other DBMS supported by SQLAlchemy.

Supported versions of SQLAlchemy include current minor versions
of branches 0.5 and 0.6 as well as 0.7 since 0.7.2.

.. _`Vadim Tropashko`:
.. _`Sql Design Patterns`:
.. _`Trees in SQL: Nested Sets and Materialized Path (by Vadim Tropashko)`:
.. _`sqlite`:
.. _`MySQL`:
.. _`PostgreSQL`:

    from setuptools import setup
except ImportError:
    from distutils.core import setup

version = "0.6"
url = ""

    description="sqlamp is an implementation of " \
                "Materialized Path for SQLAlchemy.",
    author='Anton Gritsay',
    download_url="%s/sqlamp-%s.tar.gz" % (url, version),
    install_requires=['SQLAlchemy >= 0.5'],

        'Development Status :: 4 - Beta',
        'Environment :: Plugins',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Database',