Skip to content

Commit 20022a3

Browse files
committed
Update docs
1 parent 56ae001 commit 20022a3

92 files changed

Lines changed: 544 additions & 180 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: e7a1aabf92bfa9dc55e82eafd9c4285a
3+
config: d4779d43d969b5c7b9df3c864c657978
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_sources/api.rst.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ The :func:`connect` function is the primary entry point for the SingleStore
99
package. It connects to a SingleStore database using either
1010
`DB-API <https://peps.python.org/pep-0249/>`_ compliant parameters,
1111
or a connection string in the form of a URL.
12+
The :func:`create_engine` function is used with the SQLAlchemy package
13+
to create an SQLAlchemy engine for SingleStoreDB connections. This is
14+
primarily for use in environments where the connection parameters are
15+
stored in environment variables so that you can create SingleStoreDB
16+
connections without specifying any parameters in the code itself.
1217
.. autosummary::
1318
:toctree: generated/
1419
connect
20+
create_engine
1521
Connection
1622
..........
1723
Connection objects are created by the :func:`singlestoredb.connect` function. They are
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
singlestoredb.create\_engine
2+
============================
3+
.. currentmodule:: singlestoredb
4+
.. autofunction:: create_engine

docs/_sources/whatsnew.rst.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ This document outlines features and improvements from each release.
55
.. note:: All releases before v1.0.0 are considered pre-release and
66
are for non-production testing and evaluation, and may include
77
changes to the API.
8+
v0.8.1 - July, 12, 2023
9+
-----------------------
10+
* Add `create_engine` function to return SQLAlchemy engine while supporting
11+
environment variable parameter settings and settings in options
12+
v0.8.0 - July, 12, 2023
13+
-----------------------
14+
* ! Python 3.8 is now the minimum required version
15+
* Add parameter conversion routines to HTTP driver
816
v0.7.1 - June 15, 2023
917
----------------------
1018
* Add ``connect_timeout`` and ``multi_statements`` options to connection

docs/_static/documentation_options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var DOCUMENTATION_OPTIONS = {
22
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3-
VERSION: '0.7.1',
3+
VERSION: '0.8.1',
44
LANGUAGE: 'en',
55
COLLAPSE_INDEX: false,
66
BUILDER: 'html',

docs/_static/sphinx_highlight.js

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
/* Highlighting utilities for Sphinx HTML documentation. */
2+
"use strict";
3+
const SPHINX_HIGHLIGHT_ENABLED = true
4+
/**
5+
* highlight a given string on a node by wrapping it in
6+
* span elements with the given class name.
7+
*/
8+
const _highlight = (node, addItems, text, className) => {
9+
if (node.nodeType === Node.TEXT_NODE) {
10+
const val = node.nodeValue;
11+
const parent = node.parentNode;
12+
const pos = val.toLowerCase().indexOf(text);
13+
if (
14+
pos >= 0 &&
15+
!parent.classList.contains(className) &&
16+
!parent.classList.contains("nohighlight")
17+
) {
18+
let span;
19+
const closestNode = parent.closest("body, svg, foreignObject");
20+
const isInSVG = closestNode && closestNode.matches("svg");
21+
if (isInSVG) {
22+
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
23+
} else {
24+
span = document.createElement("span");
25+
span.classList.add(className);
26+
}
27+
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
28+
parent.insertBefore(
29+
span,
30+
parent.insertBefore(
31+
document.createTextNode(val.substr(pos + text.length)),
32+
node.nextSibling
33+
)
34+
);
35+
node.nodeValue = val.substr(0, pos);
36+
if (isInSVG) {
37+
const rect = document.createElementNS(
38+
"http://www.w3.org/2000/svg",
39+
"rect"
40+
);
41+
const bbox = parent.getBBox();
42+
rect.x.baseVal.value = bbox.x;
43+
rect.y.baseVal.value = bbox.y;
44+
rect.width.baseVal.value = bbox.width;
45+
rect.height.baseVal.value = bbox.height;
46+
rect.setAttribute("class", className);
47+
addItems.push({ parent: parent, target: rect });
48+
}
49+
}
50+
} else if (node.matches && !node.matches("button, select, textarea")) {
51+
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
52+
}
53+
};
54+
const _highlightText = (thisNode, text, className) => {
55+
let addItems = [];
56+
_highlight(thisNode, addItems, text, className);
57+
addItems.forEach((obj) =>
58+
obj.parent.insertAdjacentElement("beforebegin", obj.target)
59+
);
60+
};
61+
/**
62+
* Small JavaScript module for the documentation.
63+
*/
64+
const SphinxHighlight = {
65+
/**
66+
* highlight the search words provided in localstorage in the text
67+
*/
68+
highlightSearchWords: () => {
69+
if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
70+
// get and clear terms from localstorage
71+
const url = new URL(window.location);
72+
const highlight =
73+
localStorage.getItem("sphinx_highlight_terms")
74+
|| url.searchParams.get("highlight")
75+
|| "";
76+
localStorage.removeItem("sphinx_highlight_terms")
77+
url.searchParams.delete("highlight");
78+
window.history.replaceState({}, "", url);
79+
// get individual terms from highlight string
80+
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
81+
if (terms.length === 0) return; // nothing to do
82+
// There should never be more than one element matching "div.body"
83+
const divBody = document.querySelectorAll("div.body");
84+
const body = divBody.length ? divBody[0] : document.querySelector("body");
85+
window.setTimeout(() => {
86+
terms.forEach((term) => _highlightText(body, term, "highlighted"));
87+
}, 10);
88+
const searchBox = document.getElementById("searchbox");
89+
if (searchBox === null) return;
90+
searchBox.appendChild(
91+
document
92+
.createRange()
93+
.createContextualFragment(
94+
'<p class="highlight-link">' +
95+
'<a href="javascript:SphinxHighlight.hideSearchWords()">' +
96+
_("Hide Search Matches") +
97+
"</a></p>"
98+
)
99+
);
100+
},
101+
/**
102+
* helper function to hide the search marks again
103+
*/
104+
hideSearchWords: () => {
105+
document
106+
.querySelectorAll("#searchbox .highlight-link")
107+
.forEach((el) => el.remove());
108+
document
109+
.querySelectorAll("span.highlighted")
110+
.forEach((el) => el.classList.remove("highlighted"));
111+
localStorage.removeItem("sphinx_highlight_terms")
112+
},
113+
initEscapeListener: () => {
114+
// only install a listener if it is really needed
115+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
116+
document.addEventListener("keydown", (event) => {
117+
// bail for input elements
118+
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
119+
// bail with special keys
120+
if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
121+
if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
122+
SphinxHighlight.hideSearchWords();
123+
event.preventDefault();
124+
}
125+
});
126+
},
127+
};
128+
_ready(SphinxHighlight.highlightSearchWords);
129+
_ready(SphinxHighlight.initEscapeListener);

docs/api.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>API Reference &mdash; SingleStoreDB 0.7.1 documentation</title>
6+
<title>API Reference &mdash; SingleStoreDB 0.8.1 documentation</title>
77
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
88
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
99
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
@@ -28,7 +28,7 @@
2828
SingleStoreDB
2929
</a>
3030
<div class="version">
31-
0.7.1
31+
0.8.1
3232
</div>
3333
<div role="search">
3434
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
@@ -46,6 +46,7 @@
4646
<li class="toctree-l1 current"><a class="current reference internal" href="#">API Reference</a><ul>
4747
<li class="toctree-l2"><a class="reference internal" href="#connections">Connections</a><ul>
4848
<li class="toctree-l3"><a class="reference internal" href="generated/singlestoredb.connect.html">singlestoredb.connect</a></li>
49+
<li class="toctree-l3"><a class="reference internal" href="generated/singlestoredb.create_engine.html">singlestoredb.create_engine</a></li>
4950
<li class="toctree-l3"><a class="reference internal" href="#connection">Connection</a><ul>
5051
<li class="toctree-l4"><a class="reference internal" href="generated/singlestoredb.connection.Connection.html">Connection</a></li>
5152
<li class="toctree-l4"><a class="reference internal" href="generated/singlestoredb.connection.Connection.autocommit.html">Connection.autocommit</a></li>
@@ -181,11 +182,19 @@
181182
package. It connects to a SingleStore database using either
182183
<a class="reference external" href="https://peps.python.org/pep-0249/">DB-API</a> compliant parameters,
183184
or a connection string in the form of a URL.</p>
185+
<p>The <a class="reference internal" href="generated/singlestoredb.create_engine.html#singlestoredb.create_engine" title="singlestoredb.create_engine"><code class="xref py py-func docutils literal notranslate"><span class="pre">create_engine()</span></code></a> function is used with the SQLAlchemy package
186+
to create an SQLAlchemy engine for SingleStoreDB connections. This is
187+
primarily for use in environments where the connection parameters are
188+
stored in environment variables so that you can create SingleStoreDB
189+
connections without specifying any parameters in the code itself.</p>
184190
<table class="autosummary longtable docutils align-default">
185191
<tbody>
186192
<tr class="row-odd"><td><p><a class="reference internal" href="generated/singlestoredb.connect.html#singlestoredb.connect" title="singlestoredb.connect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">connect</span></code></a>([host, user, password, port, ...])</p></td>
187193
<td><p>Return a SingleStoreDB connection.</p></td>
188194
</tr>
195+
<tr class="row-even"><td><p><a class="reference internal" href="generated/singlestoredb.create_engine.html#singlestoredb.create_engine" title="singlestoredb.create_engine"><code class="xref py py-obj docutils literal notranslate"><span class="pre">create_engine</span></code></a>(*args, **kwargs)</p></td>
196+
<td><p>Create an SQLAlchemy engine for SingleStoreDB.</p></td>
197+
</tr>
189198
</tbody>
190199
</table>
191200
<section id="connection">

docs/generated/singlestoredb.auth.get_jwt.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>singlestoredb.auth.get_jwt &mdash; SingleStoreDB 0.7.1 documentation</title>
6+
<title>singlestoredb.auth.get_jwt &mdash; SingleStoreDB 0.8.1 documentation</title>
77
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
88
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
99
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@@ -28,7 +28,7 @@
2828
SingleStoreDB
2929
</a>
3030
<div class="version">
31-
0.7.1
31+
0.8.1
3232
</div>
3333
<div role="search">
3434
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">

docs/generated/singlestoredb.connect.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>singlestoredb.connect &mdash; SingleStoreDB 0.7.1 documentation</title>
6+
<title>singlestoredb.connect &mdash; SingleStoreDB 0.8.1 documentation</title>
77
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
88
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
99
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@@ -16,7 +16,7 @@
1616
<script src="../_static/js/theme.js"></script>
1717
<link rel="index" title="Index" href="../genindex.html" />
1818
<link rel="search" title="Search" href="../search.html" />
19-
<link rel="next" title="singlestoredb.connection.Connection" href="singlestoredb.connection.Connection.html" />
19+
<link rel="next" title="singlestoredb.create_engine" href="singlestoredb.create_engine.html" />
2020
<link rel="prev" title="API Reference" href="../api.html" />
2121
</head>
2222
<body class="wy-body-for-nav">
@@ -28,7 +28,7 @@
2828
SingleStoreDB
2929
</a>
3030
<div class="version">
31-
0.7.1
31+
0.8.1
3232
</div>
3333
<div role="search">
3434
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
@@ -49,6 +49,7 @@
4949
<li class="toctree-l4"><a class="reference internal" href="#singlestoredb.connect"><code class="docutils literal notranslate"><span class="pre">connect()</span></code></a></li>
5050
</ul>
5151
</li>
52+
<li class="toctree-l3"><a class="reference internal" href="singlestoredb.create_engine.html">singlestoredb.create_engine</a></li>
5253
<li class="toctree-l3"><a class="reference internal" href="../api.html#connection">Connection</a></li>
5354
<li class="toctree-l3"><a class="reference internal" href="../api.html#cursor">Cursor</a></li>
5455
</ul>
@@ -189,7 +190,7 @@ <h1>singlestoredb.connect<a class="headerlink" href="#singlestoredb-connect" tit
189190
</div>
190191
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
191192
<a href="../api.html" class="btn btn-neutral float-left" title="API Reference" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
192-
<a href="singlestoredb.connection.Connection.html" class="btn btn-neutral float-right" title="singlestoredb.connection.Connection" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
193+
<a href="singlestoredb.create_engine.html" class="btn btn-neutral float-right" title="singlestoredb.create_engine" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
193194
</div>
194195
<hr/>
195196
<div role="contentinfo">

docs/generated/singlestoredb.connection.Connection.autocommit.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>singlestoredb.connection.Connection.autocommit &mdash; SingleStoreDB 0.7.1 documentation</title>
6+
<title>singlestoredb.connection.Connection.autocommit &mdash; SingleStoreDB 0.8.1 documentation</title>
77
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
88
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
99
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@@ -28,7 +28,7 @@
2828
SingleStoreDB
2929
</a>
3030
<div class="version">
31-
0.7.1
31+
0.8.1
3232
</div>
3333
<div role="search">
3434
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
@@ -46,6 +46,7 @@
4646
<li class="toctree-l1 current"><a class="reference internal" href="../api.html">API Reference</a><ul class="current">
4747
<li class="toctree-l2 current"><a class="reference internal" href="../api.html#connections">Connections</a><ul class="current">
4848
<li class="toctree-l3"><a class="reference internal" href="singlestoredb.connect.html">singlestoredb.connect</a></li>
49+
<li class="toctree-l3"><a class="reference internal" href="singlestoredb.create_engine.html">singlestoredb.create_engine</a></li>
4950
<li class="toctree-l3 current"><a class="reference internal" href="../api.html#connection">Connection</a><ul class="current">
5051
<li class="toctree-l4"><a class="reference internal" href="singlestoredb.connection.Connection.html">Connection</a></li>
5152
<li class="toctree-l4 current"><a class="current reference internal" href="#">Connection.autocommit</a></li>

0 commit comments

Comments
 (0)