@@ -39,9 +39,9 @@ def hydrate(self, values):
3939
4040
4141class GraphDatabase (object ):
42- """ The :class:`. GraphDatabase` class provides access to all graph
43- database functionality. This is primarily used to construct a driver
44- instance, using the :meth:`.driver` method.
42+ """ The ` GraphDatabase` class provides access to all graph
43+ database functionality. This class is primarily used to construct a
44+ :class:`.Driver` instance, using the :meth:`.driver` method.
4545 """
4646
4747 uri_schemes = {}
@@ -50,31 +50,33 @@ class GraphDatabase(object):
5050
5151 @classmethod
5252 def driver (cls , uri , ** config ):
53- """ Acquire a :class:`.Driver` instance for the given URL and
54- configuration:
53+ """ Acquire a :class:`.Driver` instance for the given URI and
54+ configuration. The URI scheme determines the Driver implementation
55+ that will be returned. Options are:
5556
56- >>> from neo4j.v1 import GraphDatabase
57- >>> driver = GraphDatabase.driver("bolt://localhost:7687")
57+ ``bolt``
58+ Returns a :class:`.DirectDriver`.
5859
59- :param uri: URI for a graph database
60+ ``bolt+routing``
61+ Returns a :class:`.RoutingDriver`.
62+
63+ :param uri: URI for a graph database service
6064 :param config: configuration and authentication details (valid keys are listed below)
6165
6266 `auth`
6367 An authentication token for the server, for example
64- ``basic_auth ("neo4j", "password")``.
68+ ``("neo4j", "password")``.
6569
6670 `der_encoded_server_certificate`
6771 The server certificate in DER format, if required.
6872
6973 `encrypted`
70- Encryption level: one of :attr:`.ENCRYPTION_ON`, :attr:`.ENCRYPTION_OFF`
71- or :attr:`.ENCRYPTION_NON_LOCAL`. The default setting varies
72- depending on whether SSL is available or not. If it is,
73- :attr:`.ENCRYPTION_NON_LOCAL` is the default.
74+ A boolean flag to determine whether encryption should be used.
75+ Defaults to :const:`True`.
7476
7577 `trust`
76- Trust level: one of :attr:`.TRUST_ON_FIRST_USE ` (default) or
77- :attr:`.TRUST_SIGNED_CERTIFICATES `.
78+ Trust level: one of :attr:`.TRUST_ALL_CERTIFICATES ` (default) or
79+ :attr:`.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES `.
7880
7981 `user_agent`
8082 A custom user agent string, if required.
@@ -90,12 +92,12 @@ def driver(cls, uri, **config):
9092
9193
9294class Driver (object ):
93- """ A : class:`. Driver` is an accessor for a specific graph database
94- resource . It is thread-safe, acts as a template for sessions and hosts
95- a connection pool.
95+ """ The base class for all ` Driver` implementations. A Driver is an accessor for
96+ a specific graph database . It is typically thread-safe, acts as a template for
97+ :class:`.Session` creation and hosts a connection pool.
9698
9799 All configuration and authentication settings are held immutably by the
98- ` Driver` . Should different settings be required, a new ` Driver` instance
100+ Driver. Should different settings be required, a new Driver instance
99101 should be created via the :meth:`.GraphDatabase.driver` method.
100102 """
101103
@@ -118,10 +120,16 @@ def session(self, access_mode=None):
118120 pool. Session creation is a lightweight operation and sessions are
119121 not thread safe, therefore a session should generally be short-lived
120122 within a single thread.
123+
124+ :param access_mode:
125+ :return: new :class:`.Session` object
121126 """
122127 pass
123128
124129 def close (self ):
130+ """ Shut down, closing any open connections that were spawned by
131+ this Driver.
132+ """
125133 if self .pool :
126134 self .pool .close ()
127135 self .pool = None
0 commit comments