Skip to main content

Official Shooju Client

Project description

shooju is the official python client for Shooju with the following features:

  • Authentication via username and api key

  • Getting series points and fields

  • Registering import jobs and writing and removing points and fields

Installation

Install using pip:

pip install shooju

Basic Usage

>>> from shooju import Connection, sid, Point
>>> from datetime import date
>>> conn = Connection(server = <API_SERVER>, user = <USERNAME>, api_key = <API_KEY>)
>>> job = conn.register_job('China Pop.')
>>> series_id = sid("users", <USERNAME>, "china", "population")
>>> job.put_point(series_id, Point(date(2012, 1, 1), 314.3))
>>> job.put_field(series_id, "unit", "millions")
>>> print conn.get_point(series_id, date(2012, 1, 1)).value
313.3
>>> print conn.get_field(series_id, "unit")
millions

Source

https://bitbucket.org/shooju/python-client

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shooju-0.2.tar.gz (10.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page