예제 #1
0
파일: client.py 프로젝트: nellaivijay/bulbs
    def create_edge(self, outV, label, inV, data=None):
        """
        Creates a edge and returns the Response.
        
        :param outV: Outgoing vertex ID.
        :type outV: int

        :param label: Edge label.
        :type label: str

        :param inV: Incoming vertex ID.
        :type inV: int

        :param data: Property data.
        :type data: dict or None

        :rtype: Neo4jResponse

        """
        if self.config.autoindex is True:
            index_name = self.config.edge_index
            return self.create_indexed_edge(outV, label, inV, data, index_name, keys=None)
        data = self._remove_null_values(data)
        inV_uri = self._build_vertex_uri(inV)
        path = build_path(vertex_path, outV, "relationships")
        params = {"to": inV_uri, "type": label, "data": data}
        return self.request.post(path, params)
예제 #2
0
 def update_vertex(self,_id,data):
     data = self._remove_null_values(data)
     if self.config.autoindex is True:
         index_name = self.config.vertex_autoindex
         return self.update_indexed_vertex(_id,data,index_name,keys=None)
     path = build_path(self.vertex_path,_id,"properties")
     return self.request.put(path,data)
예제 #3
0
파일: client.py 프로젝트: ct2034/bulbs
    def create_unique_vertex(self, index_name, key, value, data=None):
        """
        Create unique (based on the key / value pair) vertex with the properties
        described by data.

        :param index_name: Name of the index.
        :type index_name: str

        :param key: Name of the key.
        :type key: str

        :param value: Value of the key.
        :type value: str

        :param data: Properties of the new element.
        :type data: dict

        :rtype: Neo4jResponse

        """
        data = {} if data is None else data
        data = self._remove_null_values(data)
        path = (build_path(index_path, vertex_path, index_name) +
                '?uniqueness=get_or_create')
        params = {'key': key, 'value': value, 'properties': data}
        return self.request.post(path, params)
예제 #4
0
    def put_vertex(self, index_name, key, value, _id):
        """
        Adds a vertex to the index with the index_name.

        :param index_name: Name of the index.
        :type index_name: str

        :param key: Name of the key.
        :type key: str

        :param value: Value of the key.
        :type value: str

        :param _id: Vertex ID
        :type _id: int
        
        :rtype: RexsterResponse

        """
        # Rexster's API only supports string lookups so convert value to a string
        path = build_path(index_path, index_name)
        params = {
            'key': key,
            'value': str(value),
            'class': 'vertex',
            'id': _id
        }
        return self.request.put(path, params)
예제 #5
0
 def update_edge(self,_id,data):
     data = self._remove_null_values(data)
     if self.config.autoindex is True:
         index_name = self.config.edge_autoindex
         return self.update_indexed_edge(_id,data,index_name,keys=None)
     path = build_path("relationship",_id,"properties")
     return self.request.put(path,data)
예제 #6
0
 def update_edge(self, _id, data):
     data = self._remove_null_values(data)
     if self.config.autoindex is True:
         index_name = self.config.edge_autoindex
         return self.update_indexed_edge(_id, data, index_name, keys=None)
     path = build_path("relationship", _id, "properties")
     return self.request.put(path, data)
예제 #7
0
    def create_unique_vertex(self, index_name, key, value, data=None):
        """
        Create unique (based on the key / value pair) vertex with the properties
        described by data.

        :param index_name: Name of the index.
        :type index_name: str

        :param key: Name of the key.
        :type key: str

        :param value: Value of the key.
        :type value: str

        :param data: Properties of the new element.
        :type data: dict

        :rtype: Neo4jResponse

        """
        data = {} if data is None else data
        data = self._remove_null_values(data)
        path = (build_path(index_path, vertex_path, index_name) +
                '?uniqueness=get_or_create')
        params = {'key': key, 'value': value, 'properties': data}
        return self.request.post(path, params)
예제 #8
0
 def update_vertex(self, _id, data):
     data = self._remove_null_values(data)
     if self.config.autoindex is True:
         index_name = self.config.vertex_autoindex
         return self.update_indexed_vertex(_id, data, index_name, keys=None)
     path = build_path(self.vertex_path, _id, "properties")
     return self.request.put(path, data)
예제 #9
0
파일: client.py 프로젝트: ct2034/bulbs
    def create_edge(self, outV, label, inV, data=None, keys=None):
        """
        Creates a edge and returns the Response.
        
        :param outV: Outgoing vertex ID.
        :type outV: int

        :param label: Edge label.
        :type label: str

        :param inV: Incoming vertex ID.
        :type inV: int

        :param data: Property data.
        :type data: dict or None

        :rtype: Neo4jResponse

        """
        if keys or self.config.autoindex is True:
            index_name = self.config.edge_index
            return self.create_indexed_edge(outV,
                                            label,
                                            inV,
                                            data,
                                            index_name,
                                            keys=keys)
        data = self._remove_null_values(data)
        inV_uri = self._build_vertex_uri(inV)
        path = build_path(vertex_path, outV, "relationships")
        params = {'to': inV_uri, 'type': label, 'data': data}
        return self.request.post(path, params)
예제 #10
0
파일: message.py 프로젝트: nicholsn/bulbs
 def create_edge(self,outV,label,inV,data={}): 
     """Creates a edge and returns the Response."""
     data = self._remove_null_values(data)
     inV_uri = self._build_vertex_uri(inV)
     path = build_path(vertex_path,outV,"relationships")
     params = {'to':inV_uri,'type':label, 'data':data}
     return POST, path, params
예제 #11
0
 def create_edge_index(self,name,*args,**kwds):
     path = build_path(self.index_path,name)
     index_type = kwds.get('index_type','automatic')
     index_keys = kwds.get('index_keys',None)                              
     params = {'class':'edge','type':index_type}
     if index_keys: 
         params.update({'keys':index_keys})
     return self.request.post(path,params)
예제 #12
0
 def create_edge_index(self, name, *args, **kwds):
     path = build_path(self.index_path, name)
     index_type = kwds.get('index_type', 'automatic')
     index_keys = kwds.get('index_keys', None)
     params = {'class': 'edge', 'type': index_type}
     if index_keys:
         params.update({'keys': index_keys})
     return self.request.post(path, params)
예제 #13
0
 def remove_vertex_from_index(self,name,_id,key=None,value=None):
     #if key is not None and value is not None:
     #    path = build_path("node",name,key,value,_id)
     #elif key is not None:
     #    path = build_path("node",name,key,_id)
     #else:
     #    path = build_path("node",name,_id)
     path = build_path("node",name,key,value,_id)
     return self.request.delete(path,params=None)
예제 #14
0
 def remove_vertex_from_index(self, name, _id, key=None, value=None):
     #if key is not None and value is not None:
     #    path = build_path("node",name,key,value,_id)
     #elif key is not None:
     #    path = build_path("node",name,key,_id)
     #else:
     #    path = build_path("node",name,_id)
     path = build_path("node", name, key, value, _id)
     return self.request.delete(path, params=None)
예제 #15
0
 def create_edge(self,outV,label,inV,data={}): 
     data = self._remove_null_values(data)
     if self.config.autoindex is True:
         index_name = self.config.edge_autoindex
         return self.create_indexed_edge(outV,label,inV,data,index_name,keys=None)
     path = build_path(self.vertex_path,outV,self.edge_path)
     inV_uri = "%s/node/%s" % (self.config.root_uri.rstrip("/"), inV)
     params = {'to':inV_uri,'type':label, 'data':data}
     return self.request.post(path,params)
예제 #16
0
파일: client.py 프로젝트: nellaivijay/bulbs
 def _build_vertex_uri(self, _id, *args):
     placeholder = self._placeholder(_id)
     if placeholder:
         return placeholder
     root_uri = self.config.root_uri.rstrip("/")
     segments = [vertex_path, _id] + list(args)
     path = build_path(*segments)
     uri = "%s/%s" % (root_uri, path)
     return uri
예제 #17
0
파일: resource.py 프로젝트: zetsub0u/bulbs
 def create_edge_index(self,name,*args,**kwds):
     """Creates a edge index with the specified params."""
     path = build_path(self.index_path,name)
     index_type = kwds.get('index_type','manual')
     index_keys = kwds.get('index_keys',None)                              
     params = {'class':'edge','type':index_type}
     if index_keys: 
         params.update({'keys':index_keys})
     return self.request.post(path,params)
예제 #18
0
파일: client.py 프로젝트: ct2034/bulbs
 def _build_vertex_uri(self, _id, *args):
     placeholder = self._placeholder(_id)
     if placeholder:
         return placeholder
     root_uri = self.config.root_uri.rstrip("/")
     segments = [vertex_path, _id] + list(args)
     path = build_path(*segments)
     uri = "%s/%s" % (root_uri, path)
     return uri
예제 #19
0
파일: client.py 프로젝트: ct2034/bulbs
    def get_edge_indices(self):
        """
        Returns a dict of all the vertex indices.

        :rtype: Neo4jResponse

        """
        path = build_path(index_path, edge_path)
        params = None
        return self.request.get(path, params)
예제 #20
0
파일: client.py 프로젝트: nellaivijay/bulbs
    def get_edge_indices(self):
        """
        Returns a dict of all the vertex indices.

        :rtype: Neo4jResponse

        """
        path = build_path(index_path, edge_path)
        params = None
        return self.request.get(path, params)
예제 #21
0
파일: client.py 프로젝트: nellaivijay/bulbs
 def _build_vertex_path(self, _id, *args):
     # if the _id is a placeholder, return the placeholder;
     # othewise, return a normal vertex path
     placeholder = self._placeholder(_id)
     if placeholder:
         segments = [placeholder]
     else:
         segments = [vertex_path, _id]
     segments = segments + list(args)
     return build_path(*segments)
예제 #22
0
 def create_vertex_index(self, index_name, *args, **kwds):
     index_type = kwds.pop("index_type", "exact")
     provider = kwds.pop("provider", "lucene")
     #keys = kwds.pop("keys",None)
     #keys = json.dumps(keys) if keys else "null"
     #config = {'type':index_type,'provider':provider,'keys':str(keys)}
     config = {'type': index_type, 'provider': provider}
     path = build_path(self.index_path, "node")
     params = dict(name=index_name, config=config)
     return self.request.post(path, params)
예제 #23
0
파일: client.py 프로젝트: nellaivijay/bulbs
    def get_vertex_indices(self):
        """
        Returns all the vertex indices.

        :rtype: Neo4jResponse

        """
        path = build_path(index_path, "node")
        params = None
        return self.request.get(path, params)
예제 #24
0
파일: client.py 프로젝트: ct2034/bulbs
 def _build_vertex_path(self, _id, *args):
     # if the _id is a placeholder, return the placeholder;
     # othewise, return a normal vertex path
     placeholder = self._placeholder(_id)
     if placeholder:
         segments = [placeholder]
     else:
         segments = [vertex_path, _id]
     segments = segments + list(args)
     return build_path(*segments)
예제 #25
0
 def create_vertex_index(self,index_name,*args,**kwds):
     index_type = kwds.pop("index_type","exact")
     provider = kwds.pop("provider","lucene")
     #keys = kwds.pop("keys",None)
     #keys = json.dumps(keys) if keys else "null"
     #config = {'type':index_type,'provider':provider,'keys':str(keys)}
     config = {'type':index_type,'provider':provider}
     path = build_path(self.index_path,"node")
     params = dict(name=index_name,config=config)
     return self.request.post(path,params)
예제 #26
0
 def put_vertex(self, name, key, value, _id):
     # Rexster's API only supports string lookups so convert value to a string
     path = build_path(self.index_path, name)
     params = {
         'key': key,
         'value': str(value),
         'class': 'vertex',
         'id': _id
     }
     return self.request.post(path, params)
예제 #27
0
파일: message.py 프로젝트: nicholsn/bulbs
 def create_vertex_index(self,index_name,*args,**kwds):
     """Creates a vertex index with the specified params."""
     index_type = kwds.pop("index_type","exact")
     provider = kwds.pop("provider","lucene")
     #keys = kwds.pop("keys",None)
     #config = {'type':index_type,'provider':provider,'keys':str(keys)}
     config = {'type':index_type,'provider':provider}
     path = build_path(index_path,"node")
     params = dict(name=index_name,config=config)
     return POST, path, params
예제 #28
0
파일: client.py 프로젝트: kod3r/bulbs
 def bothV_ids(self,
               _id,
               label=None,
               start=None,
               limit=None,
               properties=None):
     path = build_path(vertex_path, _id, "bothIds")
     params = build_params(_label=label,
                           _limit=limit,
                           _properties=properties)
     return self.request.get(path, params)
예제 #29
0
파일: client.py 프로젝트: kod3r/bulbs
 def inV_count(self,
               _id,
               label=None,
               start=None,
               limit=None,
               properties=None):
     path = build_path(vertex_path, _id, "inCount")
     params = build_params(_label=label,
                           _limit=limit,
                           _properties=properties)
     return self.request.get(path, params)
예제 #30
0
    def get_vertex(self, _id):
        """
        Gets the vertex with the _id and returns the Response.

        :param data: Vertex ID.
        :type data: int

        :rtype: RexsterResponse

        """
        path = build_path(vertex_path, _id)
        return self.request.get(path, params=None)
예제 #31
0
    def get_edge(self, _id):
        """
        Gets the edge with the _id and returns the Response.

        :param data: Edge ID.
        :type data: int

        :rtype: RexsterResponse

        """
        path = build_path(edge_path, _id)
        return self.request.get(path, params=None)
예제 #32
0
    def delete_edge(self, _id):
        """
        Deletes a edge with the _id and returns the Response.

        :param _id: Edge ID.
        :type _id: dict

        :rtype: RexsterResponse

        """
        path = build_path(edge_path, _id)
        return self.request.delete(path, params=None)
예제 #33
0
    def delete_vertex(self, _id):
        """
        Deletes a vertex with the _id and returns the Response.

        :param _id: Vertex ID.
        :type _id: dict

        :rtype: RexsterResponse

        """
        path = build_path(vertex_path, _id)
        return self.request.delete(path, params=None)
예제 #34
0
    def delete_edge(self, _id):
        """
        Deletes a edge with the _id and returns the Response.

        :param _id: Edge ID.
        :type _id: dict

        :rtype: RexsterResponse

        """
        path = build_path(edge_path, _id)
        return self.request.delete(path, params=None)
예제 #35
0
    def get_edge(self, _id):
        """
        Gets the edge with the _id and returns the Response.

        :param data: Edge ID.
        :type data: int

        :rtype: RexsterResponse

        """
        path = build_path(edge_path, _id)
        return self.request.get(path, params=None)
예제 #36
0
    def delete_vertex(self, _id):
        """
        Deletes a vertex with the _id and returns the Response.

        :param _id: Vertex ID.
        :type _id: dict

        :rtype: RexsterResponse

        """
        path = build_path(vertex_path, _id)
        return self.request.delete(path, params=None)
예제 #37
0
    def get_vertex(self, _id):
        """
        Gets the vertex with the _id and returns the Response.

        :param data: Vertex ID.
        :type data: int

        :rtype: RexsterResponse

        """
        path = build_path(vertex_path, _id)
        return self.request.get(path, params=None)
예제 #38
0
파일: client.py 프로젝트: ct2034/bulbs
    def delete_edge_index(self, index_name):
        """
        Deletes the edge index with the index_name.

        :param index_name: Name of the index.
        :type index_name: str

        :rtype: Neo4jResponse

        """
        path = build_path(index_path, edge_path, index_name)
        params = None
        return self.request.delete(path, params)
예제 #39
0
파일: client.py 프로젝트: nellaivijay/bulbs
    def delete_edge_index(self, index_name):
        """
        Deletes the edge index with the index_name.

        :param index_name: Name of the index.
        :type index_name: str

        :rtype: Neo4jResponse

        """
        path = build_path(index_path, edge_path, index_name)
        params = None
        return self.request.delete(path, params)
예제 #40
0
    def test_post(self):
        name_in = "james"
        email_in = "*****@*****.**"

        path = build_path("vertices")
        params = dict(name=name_in, email=email_in)
        resp = self.request.post(path,params)
                
        assert resp.results._type == 'vertex'
        assert name_in == resp.results.get('name') 
        assert email_in == resp.results.get('email')

        # use the results of this function for get and delete tests 
        return resp
예제 #41
0
    def test_post(self):
        name_in = "james"
        email_in = "*****@*****.**"

        path = build_path("vertices")
        params = dict(name=name_in, email=email_in)
        resp = self.request.post(path, params)

        assert resp.results._type == 'vertex'
        assert name_in == resp.results.get('name')
        assert email_in == resp.results.get('email')

        # use the results of this function for get and delete tests
        return resp
예제 #42
0
 def create_edge(self, outV, label, inV, data={}):
     data = self._remove_null_values(data)
     if self.config.autoindex is True:
         index_name = self.config.edge_autoindex
         return self.create_indexed_edge(outV,
                                         label,
                                         inV,
                                         data,
                                         index_name,
                                         keys=None)
     path = build_path(self.vertex_path, outV, self.edge_path)
     inV_uri = "%s/node/%s" % (self.config.root_uri.rstrip("/"), inV)
     params = {'to': inV_uri, 'type': label, 'data': data}
     return self.request.post(path, params)
예제 #43
0
    def test_get(self):
        resp1 = self.test_post()
        oid1 = resp1.results.get('_id')
        element_type1 = resp1.results.get('_type')
        name1 = resp1.results.get('name')
        email1 = resp1.results.get('email')

        path = build_path("vertices", oid1)
        params = dict(name=name1, email=email1)
        resp2 = self.request.get(path, params)

        assert oid1 == resp2.results.get('_id')
        assert element_type1 == resp2.results.get('_type')
        assert name1 == resp2.results.get('name')
        assert email1 == resp2.results.get('email')
예제 #44
0
    def test_get(self):
        resp1 = self.test_post()
        oid1 = resp1.results.get('_id')
        element_type1 = resp1.results.get('_type')
        name1 = resp1.results.get('name')
        email1 = resp1.results.get('email')

        path = build_path("vertices",oid1)
        params = dict(name=name1, email=email1)
        resp2 = self.request.get(path,params)

        assert oid1 == resp2.results.get('_id')
        assert element_type1 == resp2.results.get('_type')
        assert name1 == resp2.results.get('name')
        assert email1 == resp2.results.get('email')
예제 #45
0
파일: client.py 프로젝트: nellaivijay/bulbs
    def create_edge_index(self, index_name, *args, **kwds):
        """
        Creates a edge index with the specified params.

        :param index_name: Name of the index.
        :type index_name: str

        :rtype: Neo4jResponse

        """
        path = build_path(index_path, edge_path)
        params = dict(name=index_name)
        resp = self.request.post(path, params)
        resp._set_index_name(index_name)
        return resp
예제 #46
0
    def update_edge(self, _id, data, keys=None):
        """
        Updates the edge with the _id and returns the Response.

        :param _id: Edge ID.
        :type _id: dict

        :param data: Property data.
        :type data: dict

        :rtype: RexsterResponse

        """
        data = self._remove_null_values(data)
        path = build_path(edge_path, _id)
        return self.request.put(path, data)
예제 #47
0
파일: client.py 프로젝트: kod3r/bulbs
    def update_vertex(self, _id, data):
        """
        Updates the vertex with the _id and returns the Response.

        :param _id: Vertex ID.
        :type _id: dict

        :param data: Property data.
        :type data: dict

        :rtype: RexsterResponse

        """
        data = self._remove_null_values(data)
        path = build_path(vertex_path, _id)
        return self.request.put(path, data)
예제 #48
0
파일: client.py 프로젝트: nicholsn/bulbs
    def query_edge(self, index_name, params):
        """
        Queries for an edge in the index and returns the Response.

        :param index_name: Name of the index.
        :type index_name: str
        
        :param params: Query params.
        :type params: dict

        :rtype: Neo4jResponse

        """
        path = build_path(index_path,edge_path,name)
        params = params
        return self.request.get(path, params)
예제 #49
0
    def update_edge(self, _id, data):
        """
        Updates the edge with the _id and returns the Response.

        :param _id: Edge ID.
        :type _id: dict

        :param data: Property data.
        :type data: dict

        :rtype: RexsterResponse

        """
        data = self._remove_null_values(data)
        path = build_path(edge_path, _id)
        return self.request.put(path, data)
예제 #50
0
파일: client.py 프로젝트: Hinge/bulbs
    def update_vertex(self, _id, data, keys=None):
        """
        Updates the vertex with the _id and returns the Response.

        :param _id: Vertex ID.
        :type _id: dict

        :param data: Property data.
        :type data: dict

        :rtype: RexsterResponse

        """
        data = self._remove_null_values(data)
        path = build_path(vertex_path,_id)
        return self.request.put(path,data)
예제 #51
0
파일: client.py 프로젝트: nicholsn/bulbs
    def query_vertex(self, index_name, params):
        """
        Returns the vertices for the index query.

        :param index_name: Name of the index.
        :type index_name: str

        :param params: Query params.
        :type params: dict

        :rtype: Neo4jResponse

        """
        path = build_path(index_path,"node",name)
        params = params
        return self.request.get(path, params)
예제 #52
0
파일: client.py 프로젝트: ct2034/bulbs
    def query_edge(self, index_name, query):
        """
        Queries the index and returns the Response.

        :param index_name: Name of the index.
        :type index_name: str

        :param query: Lucene query string
        :type query: str

        :rtype: Neo4jResponse

        """
        path = build_path(index_path, edge_path, index_name)
        params = dict(query=query)
        return self.request.get(path, params)
예제 #53
0
파일: client.py 프로젝트: rpedigoni/bulbs
    def query_edge(self, index_name, query):
        """
        Queries the index and returns the Response.

        :param index_name: Name of the index.
        :type index_name: str

        :param query: Lucene query string
        :type query: str

        :rtype: Neo4jResponse

        """
        path = build_path(index_path, edge_path, index_name)
        params = dict(query=query)
        return self.request.get(path, params)
예제 #54
0
파일: client.py 프로젝트: rpedigoni/bulbs
    def create_edge_index(self, index_name, *args, **kwds):
        """
        Creates a edge index with the specified params.

        :param index_name: Name of the index.
        :type index_name: str

        :rtype: Neo4jResponse

        """
        default_config = {"type": "exact", "provider": "lucene"}
        index_config = kwds.pop("index_config", default_config)
        path = build_path(index_path, edge_path)
        params = dict(name=index_name, config=index_config)
        resp = self.request.post(path, params)
        resp._set_index_name(index_name)
        return resp
예제 #55
0
    def create_edge_index(self, name, *args, **kwds):
        """
        Creates a edge index with the specified params.

        :param index_name: Name of the index.
        :type index_name: str

        :rtype: RexsterResponse

        """
        path = build_path(index_path, name)
        index_type = kwds.get('index_type', 'manual')
        index_keys = kwds.get('index_keys', None)
        params = {'class': 'edge', 'type': index_type}
        if index_keys:
            params.update({'keys': index_keys})
        return self.request.post(path, params)
예제 #56
0
    def create_vertex_index(self, index_name, *args, **kwds):
        """
        Creates a vertex index with the specified params.

        :param index_name: Name of the index to create.
        :type index_name: str

        :rtype: OrientDBResponse

        """
        path = build_path(index_path, index_name)
        index_type = kwds.get('index_type', 'manual')
        index_keys = kwds.get('index_keys', None)
        params = {'class': 'vertex', 'type': index_type}
        if index_keys:
            params.update({'keys': index_keys})
        return self.request.post(path, params)
예제 #57
0
파일: client.py 프로젝트: ct2034/bulbs
    def create_edge_index(self, index_name, *args, **kwds):
        """
        Creates a edge index with the specified params.

        :param index_name: Name of the index.
        :type index_name: str

        :rtype: Neo4jResponse

        """
        default_config = {'type': "exact", 'provider': "lucene"}
        index_config = kwds.pop("index_config", default_config)
        path = build_path(index_path, edge_path)
        params = dict(name=index_name, config=index_config)
        resp = self.request.post(path, params)
        resp._set_index_name(index_name)
        return resp
예제 #58
0
    def create_edge_index(self, name, *args, **kwds):
        """
        Creates a edge index with the specified params.

        :param index_name: Name of the index.
        :type index_name: str

        :rtype: RexsterResponse

        """
        path = build_path(index_path, name)
        index_type = kwds.get("index_type", "manual")
        index_keys = kwds.get("index_keys", None)
        params = {"class": "edge", "type": index_type}
        if index_keys:
            params.update({"keys": index_keys})
        return self.request.post(path, params)
예제 #59
0
    def lookup_vertex(self, index_index_name, key, value):
        """
        Returns the vertices indexed with the key and value.

        :param index_name: Name of the index.
        :type index_name: str

        :param key: Name of the key.
        :type key: str

        :param value: Value of the key.
        :type value: str

        :rtype: RexsterResponse

        """
        path = build_path(index_path, index_index_name)
        params = dict(key=key, value=value)
        return self.request.get(path, params)
예제 #60
0
    def lookup_edge(self, index_index_name, key, value):
        """
        Looks up an edge in the index and returns the Response.

        :param index_name: Name of the index.
        :type index_name: str

        :param key: Name of the key.
        :type key: str

        :param value: Value of the key.
        :type value: str

        :rtype: RexsterResponse

        """
        path = build_path(index_path, index_index_name)
        params = dict(key=key, value=value)
        return self.request.get(path, params)