<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://docs.optrix.com.au/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>ARDI Documentation - pyapi</title>
        <description></description>
        <link>http://docs.optrix.com.au/</link>
        <lastBuildDate>Wed, 27 May 2026 01:24:39 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>http://docs.optrix.com.au/_media/wiki:dokuwiki.svg</url>
            <title>ARDI Documentation</title>
            <link>http://docs.optrix.com.au/</link>
        </image>
        <item>
            <title>AQLQuery::Execute_DF</title>
            <link>http://docs.optrix.com.au/pyapi:aqlquery_execute_df</link>
            <description>AQLQuery::Execute_DF

This function is part of the AQLQuery class.

Execute_DF is used to run an AQL query on the ARDI server and convert the historical information returned into a Pandas dataframe.

Python does a considerable amount of processing on the data to give you a</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>AQLQuery::Execute</title>
            <link>http://docs.optrix.com.au/pyapi:aqlquery_execute</link>
            <description>AQLQuery::Execute

This function is part of the AQLQuery class.

Execute is used to run an AQL query on the ARDI server.

It returns None if there is a problem or exception, and returns a parsed JSON object on success.

If the data contains measurement history, we suggest using</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>AQLQuery::HistoryToDataframe</title>
            <link>http://docs.optrix.com.au/pyapi:aqlquery_historytodataframe</link>
            <description>AQLQuery::HistoryToDataframe

This function is part of the AQLQuery class.

HistoryToDataframe is used to transform the JSON results of an ARDI AQL history request into a Pandas dataframe for use in analysis, reporting or analytics.

Its used in Execute_DF - you&#039;ll find detailed documentation about the parameters there.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Class: AQLQuery</title>
            <link>http://docs.optrix.com.au/pyapi:aqlquery</link>
            <description>Class: AQLQuery

The AQLQuery class manages a single AQL request.

It contains functions to convert historical queries into Pandas data-frames for easy processing and analytics.

Member Functions
NameDescriptionParametersinitConstructorServerExecuteExecutes the query on the server and returns the resulting JSON</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title></title>
            <link>http://docs.optrix.com.au/pyapi:ardi.py</link>
            <description>import requests
import xmltodict
import pandas as pd
import numpy as np
import json
import traceback
import time
from dateutil import tz

try:
    from urllib.parse import urlencode
except ImportError:
    from urllib import urlencode

class Context:
    def __init__(self):
        self.consolidator = 5336
        self.submission = 2991
        self.name = &quot;Actual&quot;
        self.server = &quot;&quot;

class Server:
    def __init__(self, srv, site=&#039;default&#039;, port=80):
        self.server = srv        
    …</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Channel:AsFloat</title>
            <link>http://docs.optrix.com.au/pyapi:channel_asfloat</link>
            <description>Channel:AsFloat

This function is part of the Channel class.

AsFloat is used to retrieve the value of the channel as a floating-point number. 

ARDI data generally travels as strings, but through JSON conversion might be converted to and from numeric values. As such, we always suggest casting your channels to the desired type to ensure no exceptions occurr.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Channel:AsText</title>
            <link>http://docs.optrix.com.au/pyapi:channel_astext</link>
            <description>Channel:AsText

This function is part of the Channel class.

AsText is used to retrieve the value of the channel as a string. 

ARDI data generally travels as strings, but through JSON conversion might be converted to and from numeric values. As such, we always suggest casting your channels to the desired type to ensure no exceptions occurr.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Class: Channel</title>
            <link>http://docs.optrix.com.au/pyapi:channel</link>
            <description>Class: Channel

The Channel class represents a single point of data from a live source.

Channels are created through Session objects. You should not create your own Channel instances.

Member Functions
NameDescriptionParametersAsTextReturns the value of this channel as a string</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Python API Class Reference</title>
            <link>http://docs.optrix.com.au/pyapi:class_reference</link>
            <description>Python API Class Reference

Key Classes

Server 

Session 

Channel 

AQLQuery 


Secondary Classes

Context 

Subscription</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Complete Dataframe</title>
            <link>http://docs.optrix.com.au/pyapi:complete_dataframe</link>
            <description>Complete Dataframe

A Complete Dataframe is one where there is a valid value for every time in a time-indexed dataframe.

In most cases, the data you&#039;ll request in a complex query won&#039;t have synchronised sample times. Some sensors update several times a second, others every few seconds, some once an hour.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Connecting to an ARDI Server</title>
            <link>http://docs.optrix.com.au/pyapi:connecting_to_an_ardi_server</link>
            <description>Connecting to an ARDI Server

The first step in using the API is connecting.

This verifies that the server you want to talk to is available, and discovers critical information such as how to subscribe to live data.

To connect, you create a Class: Server object, initialised with the address of the ARDI server and the site name you wish to connect to.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Class: Context</title>
            <link>http://docs.optrix.com.au/pyapi:context</link>
            <description>Class: Context

The Context class is used to store the information about an ARDI data context. 

Member Variables
NameDescriptionnameThe name of the contextconsolidatorThe port to use to contact the consolidator (used for live data)submissionThe port to use to submit new data</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Python API Examples</title>
            <link>http://docs.optrix.com.au/pyapi:examples</link>
            <description>Python API Examples

Connecting to an ARDI Server 

Reading Live Data 

Making an AQL Query 

Reading Historical Data</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Reading Historical Data / Using AQL</title>
            <link>http://docs.optrix.com.au/pyapi:making_queries</link>
            <description>Reading Historical Data / Using AQL

ARDI uses its own query language named AQL to ask for information.

It returns JSON information that you should be able to use in a variety of applications.

When you&#039;re asking for historical information (using the AQL</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Making an AQL Query</title>
            <link>http://docs.optrix.com.au/pyapi:querying_ardi_data</link>
            <description>Making an AQL Query

ARDI uses its own query language named AQL to ask for information.

It returns JSON information that you should be able to use in a variety of applications.

When you&#039;re asking for historical information (using the AQL GETHISTORY</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Reading Historical Data</title>
            <link>http://docs.optrix.com.au/pyapi:reading_historical_data</link>
            <description>Reading Historical Data

ARDI uses its own query language named AQL to ask for information.

The GETHISTORY function in AQL gets the history for one or more points of data. But these individual data points will often have different time-stamps, update rates and be a bit scattered. Trying to figure out exactly what the state of the system was at any given time can be challenging.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Reading Live Data</title>
            <link>http://docs.optrix.com.au/pyapi:reading_live_data</link>
            <description>Reading Live Data

ARDI uses a subscription model for live data. 

Instead of re-reading a list of points continuously, you subscribe to the specific set of data points you are interested in.

Then ARDI will send you responses when these values have changed.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Session:AddChannel</title>
            <link>http://docs.optrix.com.au/pyapi:server_addchannel</link>
            <description>Session:AddChannel

This function is part of the Session class.

AddChannel is used to add a single live data channel to the session.

The session won&#039;t start receiving new updates until the next call to Start.

Parameters
NameDescriptionAssetThe name of the ARDI Asset to read from</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Session:AddChannels</title>
            <link>http://docs.optrix.com.au/pyapi:server_addchannels</link>
            <description>Session:AddChannels

This function is part of the Session class.

AddChannels is used to add one or more new Channels of live data to your Session.

These channels are loaded from an AQL statement, allowing you to dynamically link to assets based on their relationships, types, properties etc.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Server::Connect</title>
            <link>http://docs.optrix.com.au/pyapi:server_connect</link>
            <description>Server::Connect

This function is part of the Server class.

Connect is used to establish and verify a connection with an ARDI server, using the information passed in the constructor (the server host name and site name).

Return Value

This function returns</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Server::Endpoint</title>
            <link>http://docs.optrix.com.au/pyapi:server_endpoint</link>
            <description>Server::Endpoint

This function is part of the Server class.

Endpoint is used to get the full URL to the ARDI server, including the signature needed when using a password-protected ARDI server.

Return Value

A string containing the full URL to use.

Note that if you have not called</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Server::GetConfiguration</title>
            <link>http://docs.optrix.com.au/pyapi:server_getconfiguration</link>
            <description>Server::GetConfiguration

This function is part of the Server class.

GetConfiguration is used to return a list of the properties and relationships within an ARDI server.

Return Value

This function returns None if an error occurred.

Otherwise, it returns an array containing two sub-arrays. The first is a list of relationships, the second a list of properties.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Class: Server</title>
            <link>http://docs.optrix.com.au/pyapi:server</link>
            <description>Class: Server

The Server class manages the connection and information about an ARDI server.

Member Functions
NameDescriptionParametersinitConstructorServer, Site(default), Port(80)ConnectConnects to the ARDI serverNoneGetConfigurationGets property and relationship information from the ARDI server</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Session:Callback</title>
            <link>http://docs.optrix.com.au/pyapi:session_callback</link>
            <description>Session:Callback

This function is part of the Session class.

Callback is used to set the callback function you want to call when changes are made to your data.

While each of your Channels are automatically updated with new data as it comes in, callbacks provide a mechanism of knowing</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Session:Start</title>
            <link>http://docs.optrix.com.au/pyapi:session_start</link>
            <description>Session:Start

This function is part of the Session class.

Start is used to begin listening for data changes from ARDI.

You will initially get an inrush of data points, as when you first connect you&#039;ll be sent the current values for every point you&#039;ve requested.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Session:Stop</title>
            <link>http://docs.optrix.com.au/pyapi:session_stop</link>
            <description>Session:Stop

This function is part of the Session class.

Stop is used to stop listening to data changes from ARDI.

This function will free up the thread that was blocked by a call to Start.

Note that there may potentially be a time-gap between the Stop request and the subscription actually stopping.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>Class: Session</title>
            <link>http://docs.optrix.com.au/pyapi:session</link>
            <description>Class: Session

The Session class manages a feed of live data from the ARDI server.

It allows you to get regular updates when values change on one or more Channels.

Member Functions
NameDescriptionParametersinitConstructorServerAddChannelAdds a single channel to the Session</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
        <item>
            <title>ARDI Python API</title>
            <link>http://docs.optrix.com.au/pyapi:start</link>
            <description>ARDI Python API

Almost any computer language can communicate with ARDIs APIs, as they are all based on web-requests.

We do however provide a Python package to make working with ARDI data even easier.

You can download the latest version here.

If you&#039;re exploring the</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 18 Dec 2025 22:50:17 +0000</pubDate>
        </item>
    </channel>
</rss>
