Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kesmit13 committed Jul 12, 2023
1 parent 56ae001 commit 20022a3
Show file tree
Hide file tree
Showing 92 changed files with 544 additions and 180 deletions.
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e7a1aabf92bfa9dc55e82eafd9c4285a
config: d4779d43d969b5c7b9df3c864c657978
tags: 645f666f9bcd5a90fca523b33c5a78b7
6 changes: 6 additions & 0 deletions docs/_sources/api.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ The :func:`connect` function is the primary entry point for the SingleStore
package. It connects to a SingleStore database using either
`DB-API <https://peps.python.org/pep-0249/>`_ compliant parameters,
or a connection string in the form of a URL.
The :func:`create_engine` function is used with the SQLAlchemy package
to create an SQLAlchemy engine for SingleStoreDB connections. This is
primarily for use in environments where the connection parameters are
stored in environment variables so that you can create SingleStoreDB
connections without specifying any parameters in the code itself.
.. autosummary::
:toctree: generated/
connect
create_engine
Connection
..........
Connection objects are created by the :func:`singlestoredb.connect` function. They are
Expand Down
4 changes: 4 additions & 0 deletions docs/_sources/generated/singlestoredb.create_engine.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
singlestoredb.create\_engine
============================
.. currentmodule:: singlestoredb
.. autofunction:: create_engine
8 changes: 8 additions & 0 deletions docs/_sources/whatsnew.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ This document outlines features and improvements from each release.
.. note:: All releases before v1.0.0 are considered pre-release and
are for non-production testing and evaluation, and may include
changes to the API.
v0.8.1 - July, 12, 2023
-----------------------
* Add `create_engine` function to return SQLAlchemy engine while supporting
environment variable parameter settings and settings in options
v0.8.0 - July, 12, 2023
-----------------------
* ! Python 3.8 is now the minimum required version
* Add parameter conversion routines to HTTP driver
v0.7.1 - June 15, 2023
----------------------
* Add ``connect_timeout`` and ``multi_statements`` options to connection
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.7.1',
VERSION: '0.8.1',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
129 changes: 129 additions & 0 deletions docs/_static/sphinx_highlight.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/* Highlighting utilities for Sphinx HTML documentation. */
"use strict";
const SPHINX_HIGHLIGHT_ENABLED = true
/**
* highlight a given string on a node by wrapping it in
* span elements with the given class name.
*/
const _highlight = (node, addItems, text, className) => {
if (node.nodeType === Node.TEXT_NODE) {
const val = node.nodeValue;
const parent = node.parentNode;
const pos = val.toLowerCase().indexOf(text);
if (
pos >= 0 &&
!parent.classList.contains(className) &&
!parent.classList.contains("nohighlight")
) {
let span;
const closestNode = parent.closest("body, svg, foreignObject");
const isInSVG = closestNode && closestNode.matches("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.classList.add(className);
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
parent.insertBefore(
span,
parent.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
const rect = document.createElementNS(
"http://www.w3.org/2000/svg",
"rect"
);
const bbox = parent.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute("class", className);
addItems.push({ parent: parent, target: rect });
}
}
} else if (node.matches && !node.matches("button, select, textarea")) {
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
}
};
const _highlightText = (thisNode, text, className) => {
let addItems = [];
_highlight(thisNode, addItems, text, className);
addItems.forEach((obj) =>
obj.parent.insertAdjacentElement("beforebegin", obj.target)
);
};
/**
* Small JavaScript module for the documentation.
*/
const SphinxHighlight = {
/**
* highlight the search words provided in localstorage in the text
*/
highlightSearchWords: () => {
if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
// get and clear terms from localstorage
const url = new URL(window.location);
const highlight =
localStorage.getItem("sphinx_highlight_terms")
|| url.searchParams.get("highlight")
|| "";
localStorage.removeItem("sphinx_highlight_terms")
url.searchParams.delete("highlight");
window.history.replaceState({}, "", url);
// get individual terms from highlight string
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
if (terms.length === 0) return; // nothing to do
// There should never be more than one element matching "div.body"
const divBody = document.querySelectorAll("div.body");
const body = divBody.length ? divBody[0] : document.querySelector("body");
window.setTimeout(() => {
terms.forEach((term) => _highlightText(body, term, "highlighted"));
}, 10);
const searchBox = document.getElementById("searchbox");
if (searchBox === null) return;
searchBox.appendChild(
document
.createRange()
.createContextualFragment(
'<p class="highlight-link">' +
'<a href="javascript:SphinxHighlight.hideSearchWords()">' +
_("Hide Search Matches") +
"</a></p>"
)
);
},
/**
* helper function to hide the search marks again
*/
hideSearchWords: () => {
document
.querySelectorAll("#searchbox .highlight-link")
.forEach((el) => el.remove());
document
.querySelectorAll("span.highlighted")
.forEach((el) => el.classList.remove("highlighted"));
localStorage.removeItem("sphinx_highlight_terms")
},
initEscapeListener: () => {
// only install a listener if it is really needed
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
document.addEventListener("keydown", (event) => {
// bail for input elements
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
// bail with special keys
if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
SphinxHighlight.hideSearchWords();
event.preventDefault();
}
});
},
};
_ready(SphinxHighlight.highlightSearchWords);
_ready(SphinxHighlight.initEscapeListener);
13 changes: 11 additions & 2 deletions docs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>API Reference &mdash; SingleStoreDB 0.7.1 documentation</title>
<title>API Reference &mdash; SingleStoreDB 0.8.1 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
Expand All @@ -28,7 +28,7 @@
SingleStoreDB
</a>
<div class="version">
0.7.1
0.8.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand All @@ -46,6 +46,7 @@
<li class="toctree-l1 current"><a class="current reference internal" href="#">API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#connections">Connections</a><ul>
<li class="toctree-l3"><a class="reference internal" href="generated/singlestoredb.connect.html">singlestoredb.connect</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/singlestoredb.create_engine.html">singlestoredb.create_engine</a></li>
<li class="toctree-l3"><a class="reference internal" href="#connection">Connection</a><ul>
<li class="toctree-l4"><a class="reference internal" href="generated/singlestoredb.connection.Connection.html">Connection</a></li>
<li class="toctree-l4"><a class="reference internal" href="generated/singlestoredb.connection.Connection.autocommit.html">Connection.autocommit</a></li>
Expand Down Expand Up @@ -181,11 +182,19 @@
package. It connects to a SingleStore database using either
<a class="reference external" href="https://peps.python.org/pep-0249/">DB-API</a> compliant parameters,
or a connection string in the form of a URL.</p>
<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
to create an SQLAlchemy engine for SingleStoreDB connections. This is
primarily for use in environments where the connection parameters are
stored in environment variables so that you can create SingleStoreDB
connections without specifying any parameters in the code itself.</p>
<table class="autosummary longtable docutils align-default">
<tbody>
<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>
<td><p>Return a SingleStoreDB connection.</p></td>
</tr>
<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>
<td><p>Create an SQLAlchemy engine for SingleStoreDB.</p></td>
</tr>
</tbody>
</table>
<section id="connection">
Expand Down
4 changes: 2 additions & 2 deletions docs/generated/singlestoredb.auth.get_jwt.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>singlestoredb.auth.get_jwt &mdash; SingleStoreDB 0.7.1 documentation</title>
<title>singlestoredb.auth.get_jwt &mdash; SingleStoreDB 0.8.1 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
Expand All @@ -28,7 +28,7 @@
SingleStoreDB
</a>
<div class="version">
0.7.1
0.8.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand Down
9 changes: 5 additions & 4 deletions docs/generated/singlestoredb.connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>singlestoredb.connect &mdash; SingleStoreDB 0.7.1 documentation</title>
<title>singlestoredb.connect &mdash; SingleStoreDB 0.8.1 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
Expand All @@ -16,7 +16,7 @@
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="singlestoredb.connection.Connection" href="singlestoredb.connection.Connection.html" />
<link rel="next" title="singlestoredb.create_engine" href="singlestoredb.create_engine.html" />
<link rel="prev" title="API Reference" href="../api.html" />
</head>
<body class="wy-body-for-nav">
Expand All @@ -28,7 +28,7 @@
SingleStoreDB
</a>
<div class="version">
0.7.1
0.8.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand All @@ -49,6 +49,7 @@
<li class="toctree-l4"><a class="reference internal" href="#singlestoredb.connect"><code class="docutils literal notranslate"><span class="pre">connect()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="singlestoredb.create_engine.html">singlestoredb.create_engine</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#connection">Connection</a></li>
<li class="toctree-l3"><a class="reference internal" href="../api.html#cursor">Cursor</a></li>
</ul>
Expand Down Expand Up @@ -189,7 +190,7 @@ <h1>singlestoredb.connect<a class="headerlink" href="#singlestoredb-connect" tit
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<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>
<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>
<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>
</div>
<hr/>
<div role="contentinfo">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>singlestoredb.connection.Connection.autocommit &mdash; SingleStoreDB 0.7.1 documentation</title>
<title>singlestoredb.connection.Connection.autocommit &mdash; SingleStoreDB 0.8.1 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
Expand All @@ -28,7 +28,7 @@
SingleStoreDB
</a>
<div class="version">
0.7.1
0.8.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand All @@ -46,6 +46,7 @@
<li class="toctree-l1 current"><a class="reference internal" href="../api.html">API Reference</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../api.html#connections">Connections</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="singlestoredb.connect.html">singlestoredb.connect</a></li>
<li class="toctree-l3"><a class="reference internal" href="singlestoredb.create_engine.html">singlestoredb.create_engine</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../api.html#connection">Connection</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="singlestoredb.connection.Connection.html">Connection</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#">Connection.autocommit</a></li>
Expand Down
5 changes: 3 additions & 2 deletions docs/generated/singlestoredb.connection.Connection.close.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>singlestoredb.connection.Connection.close &mdash; SingleStoreDB 0.7.1 documentation</title>
<title>singlestoredb.connection.Connection.close &mdash; SingleStoreDB 0.8.1 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
Expand All @@ -28,7 +28,7 @@
SingleStoreDB
</a>
<div class="version">
0.7.1
0.8.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand All @@ -46,6 +46,7 @@
<li class="toctree-l1 current"><a class="reference internal" href="../api.html">API Reference</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../api.html#connections">Connections</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="singlestoredb.connect.html">singlestoredb.connect</a></li>
<li class="toctree-l3"><a class="reference internal" href="singlestoredb.create_engine.html">singlestoredb.create_engine</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../api.html#connection">Connection</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="singlestoredb.connection.Connection.html">Connection</a></li>
<li class="toctree-l4"><a class="reference internal" href="singlestoredb.connection.Connection.autocommit.html">Connection.autocommit</a></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>singlestoredb.connection.Connection.commit &mdash; SingleStoreDB 0.7.1 documentation</title>
<title>singlestoredb.connection.Connection.commit &mdash; SingleStoreDB 0.8.1 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
Expand All @@ -28,7 +28,7 @@
SingleStoreDB
</a>
<div class="version">
0.7.1
0.8.1
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand All @@ -46,6 +46,7 @@
<li class="toctree-l1 current"><a class="reference internal" href="../api.html">API Reference</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../api.html#connections">Connections</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="singlestoredb.connect.html">singlestoredb.connect</a></li>
<li class="toctree-l3"><a class="reference internal" href="singlestoredb.create_engine.html">singlestoredb.create_engine</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../api.html#connection">Connection</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="singlestoredb.connection.Connection.html">Connection</a></li>
<li class="toctree-l4"><a class="reference internal" href="singlestoredb.connection.Connection.autocommit.html">Connection.autocommit</a></li>
Expand Down
Loading

0 comments on commit 20022a3

Please sign in to comment.