The EFD Python client#

The EFD Python client provides convenience methods for accessing EFD data.

For example, at USDF you can instantiate the EFD client using:

from lsst_efd_client import EfdClient
client = EfdClient("usdf_efd")

await client.get_topics()

where usdf_efd is an alias to the environment. It helps to discover the InfluxDB API URL and the credentials to connect to Sasquatch.

Read more about the methods available in the EFD client documentation.


To perform queries directly using InfluxQL, you can make use of the influx_client.query() method in conjunction with the EFD client.

For a comprehensive understanding of the InfluxQL query syntax, we recommend referring to the InfluxQL documentation.

from lsst_efd_client import EfdClient
client = EfdClient("usdf_efd")

query = '''SELECT vacuum FROM "lsst.sal.ATCamera.vacuum" WHERE time > '2023-04-20' '''

await client.influx_client.query(query)

InfluxQL is picky about single vs. double quotes. The rule of thumb is to use double quotes around topic names that have special characters like . and single quotes around timestamps.

Use the now() function to query data with time relative the current time in UTC.

query = '''SELECT vacuum FROM "lsst.sal.ATCamera.vacuum" WHERE time > now() - 6h '''

Example notebooks#

Querying the EFD with InfluxQL

Learn how to use the EFD client and InfluxQL to query EFD data.

Downsampling data with the GROUP BY time() clause

Learn how to downsample data with InfluxQL.

Chunked queries: Efficient Data Retrieval

Learn how to return chunked responses with the EFD client.