Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > 06f6da806447a4fcfe8c011dd17414c2 > files > 477

python-sqlalchemy-0.6.8-1.mga1.i586.rpm

"""
An example of persistence for a directed graph structure.   The graph is stored as a collection of edges, each referencing both a "lower" and an "upper" node in a table of nodes.  Basic persistence and querying for lower- and upper- neighbors are illustrated::

    n2 = Node(2)
    n5 = Node(5)
    n2.add_neighbor(n5)
    print n2.higher_neighbors()

"""