@@ -11,7 +11,7 @@ The CrateDB Python client library provides support for SQLAlchemy. A CrateDB
11
11
configuration.
12
12
13
13
The CrateDB Python client library works with SQLAlchemy versions ``1.0 ``,
14
- ``1.1 `` and ``1.2 ``.
14
+ ``1.1 ``, `` 1.2 `` and ``1.3 ``.
15
15
16
16
.. NOTE ::
17
17
@@ -49,27 +49,33 @@ Locator* (URL) called a `database URL`_.
49
49
50
50
The simplest database URL for CrateDB looks like this::
51
51
52
- crate://<HOST>
52
+ crate://<HOST>/[?option=value]
53
53
54
- Here, ``<HOST> `` is the node *host string *.
54
+ Here, ``<HOST> `` is the node *host string *. After the host, additional query
55
+ parameters can be specified to adjust some connection settings.
55
56
56
57
A host string looks like this::
57
58
58
- <HOST_ADDR>:<PORT>
59
+ [<USERNAME>:<PASSWORD>@] <HOST_ADDR>:<PORT>
59
60
60
61
Here, ``<HOST_ADDR> `` is the hostname or IP address of the CrateDB node and
61
62
``<PORT> `` is a valid `psql.port `_ number.
62
63
63
- Example host strings:
64
+ When authentication is needed, the credentials can be optionally supplied using
65
+ ``<USERNAME>:<PASSWORD>@ ``. For connecting to an SSL-secured HTTP endpoint, you
66
+ can add the query parameter ``?ssl=true `` to the database URI.
64
67
65
- - ``localhost:4200 ``
66
- - ``crate-1.vm.example.com:4200 ``
67
- - ``198.51.100.1:4200 ``
68
+ Example database URIs:
69
+
70
+ - ``crate://localhost:4200 ``
71
+ - ``crate://crate-1.vm.example.com:4200 ``
72
+ - ``
crate://username:[email protected] :4200/?ssl=true ``
73
+ - ``crate://198.51.100.1:4200 ``
68
74
69
75
.. TIP ::
70
76
71
- If ``<HOST> `` is blank (i.e. just ``crate:// ``) then `` localhost:4200 `` will
72
- be assumed.
77
+ If ``<HOST> `` is blank (i.e. the database URI is just ``crate:// ``), then
78
+ `` localhost:4200 `` will be assumed.
73
79
74
80
Getting a connection
75
81
--------------------
0 commit comments