From e20913def0d0fe2b448b27028f6efb57ef7be9df Mon Sep 17 00:00:00 2001 From: Asgeir Melling Date: Thu, 24 Aug 2023 13:40:41 +0200 Subject: [PATCH] docs: update example jupyter notebook --- examples/quickstart.ipynb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/quickstart.ipynb b/examples/quickstart.ipynb index a64ac762..a5b3dba0 100644 --- a/examples/quickstart.ipynb +++ b/examples/quickstart.ipynb @@ -31,7 +31,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "If we don't know the name of the data source, we can check which PI and IP.21 servers we have access to via ODBC ([more details](../docs/manual.md#listing-available-data-sources)):" + "If we don't know the name of the data source, we can check which PI and IP.21 servers we have access to via Web API ([more details](https://equinor.github.io/tagreader-python/docs/about/usage/data-source)):" ] }, { @@ -42,30 +42,30 @@ }, "outputs": [], "source": [ - "tagreader.list_sources(\"pi\")" + "tagreader.list_sources(\"piwebapi\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Let's establish an ODBC connection to PINO. We need to specify that PINO is a PI server. " + "By default, a cache-file using SQLite will be created to store previously read data values [more details](https://equinor.github.io/tagreader-python/docs/about/usage/caching). The cache can significantly speed up rereading of data, and it is recommended to always keep it enabled. If, for any reason, you want to disable the cache, set it to `None` when you are making the connection object." ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "c = tagreader.IMSClient(\"PINO\", \"pi\")" + "Let's establish a web API connection to PINO. We need to specify that PINO is a PI server." ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ - "By default, a cache-file using SQLite will be created to store previously read data values [more details](../docs/manual.md#caching-results). The cache can significantly speed up rereading of data, and it is recommended to always keep it enabled. If, for any reason, you want to disable the cache, set it to `None` before making the connection:" + "from tagreader.cache import SmartCache" ] }, { @@ -74,7 +74,7 @@ "metadata": {}, "outputs": [], "source": [ - "c.cache = None" + "c = tagreader.IMSClient(datasource=\"PINO\", imstype=\"piwebapi\", cache=SmartCache)" ] }, {