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


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
>>> print conn.get_field(series_id, "unit")



  • BREAKING CHANGE: search() now returns a list instead of a dictionary.
  • search() and scroll() now accept sort_on and sort_order paramters.
  • If a non-url string is provided to Connection(), https://{} will be attempted.
  • Simpler OAuth interface and instructions have been added. See bitbucket page for details.
  • Added force parameter to delete_by_query.


  • Added job.finish(submit=True) to submit job buffer and mark a job as finished.
  • Added job context to be used like: with connection.register_job(‘testjob’) as job: …


  • Added email and google_oauth_token kwargs to Connection() to allow authentication through Google Oauth. Environment variables SHOOJU_EMAIL and SHOOJU_GOOGLE_OAUTH_TOKEN can be used instead of parameters.
  • Added Connection.user property to find the currently logged in user.


  • Bug fixes.


  • Added delete_by_query function.
  • Exposed query_size in scroll().
  • Changed default size from 10 to 0 in scroll().


  • Added remove_points and remove_fields methods to RemoteJob to clear the fields/points before sending new data.


  • Change Connection search default point size to 0


  • Fix another job cache error.


  • Added pre and post submit hooks to RemoteJob to perform actions after submitting a job to shooju


  • Fix job cache error, if exception was raised cache was not flushed


  • Connection().pd.search_series renamed to search
  • Change way DataFrame is formatted when using Connection()
  • Added key_field parameters to Connection() to add a custom name for the column using series fields


  • Connection().scroll() fixed
  • Initializing Connection doesn’t ping the API
  • If series does not exist get_point, get_points, get_field, get_fields return None


  • Connection().multi_get() renamed to mget()
  • mget().get_points(), get_fields(), get_point() and get_field() return index of their result
  • Connection().register_job() requires a description of more than 3 chars
  • Connection().scroll_series() renamed to scroll()
  • Renamed and rearranged Connection parameters: Connection(server, user, api_key)
  • Field object removed, fields return a simple dict
  • Points can have value of None

Project details

Download files

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

Files for shooju, version 0.6.0
Filename, size File type Python version Upload date Hashes
Filename, size shooju-0.6.0.tar.gz (14.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page