Source

graphalchemy / graphalchemy / mixins / readers.py

Full commit
# -*- coding: utf-8 -*-
'''graph reader mixins'''

__all__ = ('Reader Mixin', 'LinksMixin', 'Nodes')


class ReaderMixin(object):

    '''graph reader base'''

    def id(self, element):
        '''
        graph element identifier

        @param element: a graph element
        '''
        return self.r.id(element)

    def properties(self, element):
        '''
        fetch a graph model's properties

        @param element: element with properties
        '''
        return self.r.properties(element)