Skip to content

htm-community/riverpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

riverpy is a python API client for River View instances.

Installation

pip install riverpy

Usage

from datetime import datetime
from riverpy import RiverViewClient

# create client that connects by default to http://data.numenta.org
client = RiverViewClient() 

# get River for http://data.numenta.org/portland-911/meta.html
river = client.river("portland-911")

# get Stream for http://data.numenta.org/portland-911/portland-911/data.html
stream = river.stream("portland-911")

# get first 500 data points, starting at 2015/05/01
cursor = stream.data(limit=500, since=datetime(2015, 4, 1))
# display some details about the data cursor
print cursor

# get data headers
headers = cursor.headers()
# get actual data
data = cursor.data()

# page through the data into the future until there's no more
while (cursor):
    cursor = cursor.next()
    print cursor

Other Examples

See harness.py for further examples of usage.

About

Python API client for River View

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages