Skip to content

rhngit/datashaka-python-rh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datashaka-python-rh

Simple Python3 client for the DataShaka API.

Install requirements via

pip3 install -r requirements.txt

Then initialise

from datashaka import DataShaka

token = 'XXXX-XXXX-XXXX'
groupspace = 'Main'
api = DataShaka(token, groupspace)

To retrieve CSV-formatted daily sales figures by country for a set time period

q = api.build_retrieve(time_from="2016-01-01", time_to="2016-01-07", 
    signal="{Sales}", context="[Country]", 
    tractor="crop [Country] ~> sort by time ~> group by day ~> sum")
res = api.retrieve(data=q, format=".csv")

About

Simple Python3 client for the DataShaka API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages