Skip to content

Instantly share code, notes, and snippets.

@gtfierro
Created July 12, 2021 16:43
Show Gist options
  • Save gtfierro/2e7201e4259c75404d05f3c52d5cd0d8 to your computer and use it in GitHub Desktop.
Save gtfierro/2e7201e4259c75404d05f3c52d5cd0d8 to your computer and use it in GitHub Desktop.
import pymortar
import os
client = pymortar.Client("https://beta-api.mortardata.org/")
query = """SELECT ?meter WHERE {?meter rdf:type brick:Electric_Meter}"""
resp = client.qualify([query])
print(resp)
res = client.data_sparql(query, start='2016-01-01T00:00:00Z', end='2016-02-01T00:00:00Z')
print(res.metadata)
print(res.streams)
print(res.data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment