rest Module

REST client based on httplib for use with Neo4j REST interface.

Resources

All REST web service objects inherit from the base Resource class.

class py2neo.rest.Resource(uri, reference_marker, metadata=None)[source]
Web service resource class, designed to work with a well-behaved REST
web service.
Parameters:
  • uri – the URI identifying this resource
  • reference_marker – marker delimiting relative part of URI, e.g. “/node”
  • metadata – previously obtained resource metadata
__uri__[source]

Absolute URI of this resource.

__metadata__[source]

Dictionary of resource metadata, cached from the last request made to the remote server. To force an update of this metadata, use the refresh() method.

refresh()[source]

Refresh resource metadata by submitting a GET request to the main resource URI.

Errors

class py2neo.rest.BadRequest(data, id_=None)[source]

Bases: exceptions.ValueError

Exception triggered by a 400 HTTP response status.

class py2neo.rest.ResourceNotFound(uri, id_=None)[source]

Bases: exceptions.LookupError

Exception triggered by a 404 HTTP response status.

class py2neo.rest.ResourceConflict(uri, id_=None)[source]

Bases: exceptions.EnvironmentError

Exception triggered by a 409 HTTP response status.

Table Of Contents

Previous topic

gremlin Module

Next topic

calendar Module

This Page