Source

graphalchemy / graphalchemy / settings.py

# -*- coding: utf-8 -*-
'''graphalchemy settings'''

from spine import DefaultSettings, RequiredSettings

__all__ = ('Defaults', 'Required')


class Required(RequiredSettings):
    appspace = 'graphalchemy'
    backends = 'backends'
    models = 'models'
    managers = 'managers'
    session = 'session.master'


class Defaults(DefaultSettings):
    root = 'root'
    userspace = Required.appspace
    backend = 'neo4j.embedded'

    class key:
        db = '_db'
        backend = 'backend'
        nodes = 'nodes'
        links = 'links'

    class anchor:
        label = 'anchor'
        description = '{name} anchor node'

    class fork:
        label = 'fork'
        reference = 'fork_of'
        created = 'fork_created'

    class reference:
        label = 'reference'
        description = '{name} reference node'

    class version:
        label = 'version'
        reference = 'version_of'
        created = 'version_created'

    class manager:
        graph = 'manager.graph'
        link = 'manager.manager.link'
        node = 'manager.manager.node'

        class collection:
            link = 'manager.collection.link'
            node = 'manager.collection.node'

        class collector:
            link = 'manager.collector.link'
            node = 'manager.collector.node'

        class element:
            link = 'manager.element.link'
            node = 'manager.element.node'

        class reader:
            link = 'manager.reader.link'
            node = 'manager.reader.node'

        class writer:
            link = 'manager.writer.link'
            node = 'manager.writer.node'

    class model:

        class collection:
            link = 'model.collection.link'
            node = 'model.collection.node'

        class collector:
            link = 'model.collector.link'
            node = 'model.collector.node'

        class element:
            node = 'model.element.node'

        class finder:
            link = 'model.finder.link'
            node = 'model.finder.node'

        class writer:
            link = 'model.writer.link'
            node = 'model.writer.node'

    class backends:

        class neo4jem:
            close = 'backends.neo4jem.close'
            connection = 'backends.neo4jem.connection'
            raw = 'backends.neo4jem.raw'
            transaction = 'backends.neo4jem.transaction'

            class read:
                link = 'backends.neo4jem.read.link'
                node = 'backends.neo4jem.read.node'

            class write:
                link = 'backends.neo4jem.write.link'
                node = 'backends.neo4jem.write.node'