Skip to main content

LispTick Python client library

Project description

lisptick-python

LispTick Python client library

It allows to send request and receive result from a LispTick server.
Get a socket connection to a LispTick server, for example:

  • lisptick.org:12006 main server
  • kereon.lisptick.org:12006 Kereon Intelligence server

Send your request and read the streamed result.

package

client_test.py is our regression test ensuring each data type is checked.

MeteoNet Example

Here is an example asking for the temperatures on 7th june 2017 2017-07-06 at Poitiers Airport (meteonet code "86027001"), data are coming from MeteoNet.

import lisptick

HOST = "lisptick.org"
PORT = 12006

def main():
    """Ask for temperature at Poitiers airport"""
    conn = lisptick.Socket(HOST, PORT)
    request = """(timeserie @"t" "meteonet" "86027001" 2017-07-06)"""
    timeserie = conn.get_result(request)
    for point in timeserie:
        print(point)

if __name__ == "__main__":
    main()

Examples

Directories with examples for different data sources.

MeteoNet

Meteorological data from Météo France.

  • oneday.py

    Simple small temperature timeserie.
    Full result is retreived into an array.

  • oneday_walk.py

    Simple small temperature timeserie.
    Streamed result is read point by point minimizing memory usage.

  • temperature_max.py

    A little bit more elaborated requests with symbol definition and Kelvin to Celsius convertion. Stream maximum temperature in Celsius at Poitiers from 1st Jan 2016 to 31th Dec 2018.

Bitstamp

Bitstamp is a cryptocurrency market place allowing bitcoin trading.
We use it as an example of live flow computation with LispTick.

  • liquidity.py

    Live simple liquidity indicators, like bid ask spread and mininum available volume at first limit.
    Shows how to request several live timeseries in one request and how to handle them.

Project details


Download files

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

Source Distribution

lisptick-0.1.0.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

lisptick-0.1.0-py3-none-any.whl (12.2 kB view hashes)

Uploaded Python 3

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