Python and kdb integration [closed]
Asked Answered
D

3

7

What are available tools/libraries to integrate Python with kdb?

Drubbing answered 11/6, 2011 at 20:4 Comment(1)
I guess you found bitbucket.org/halotis/qpy?Raffarty
R
4

I also found http://www.kx.com/a/k/connect/python/, along with http://bitbucket.org/halotis/qpy. I haven't used either.

Raffarty answered 11/6, 2011 at 20:12 Comment(2)
I will add this one, and it even has some docs :) code.kx.com/trac/wiki/Contrib/PyQ#ReleasesDrubbing
kx.com/a/k/connect/python is a link to older releases of pyk - Python for kdb (not kdb+!). The latest (but still old) code for pyk can be found at code.kx.com/wsvn/code/contrib/serpent.speak/trunk/K. PyQ is a successor to pyk and provides Python for kdb+.Inconsistency
P
9

The timestored website has a guide to the python apis for kdb complete with videos. https://www.timestored.com/kdb-guides/python-api

To summarize your options:

  1. qPython - Newest API, supporting Python 2.7
  2. Dan Nugents Python Library - Still maintained API for pulling data into Python <=v2.6 from a kdb server. Faster than qpy.
  3. qpy - Original API that was based on kx.com's java API. Slower than Dans but nicer formatting of tables when printed.
  4. PyQ - Gone? - Brings Python and Q interpreters into the same process and allows code written in either of the languages to operate on the same data. Supports Python 2.7 and 3.x and all versions of kdb+.
  5. PyKX - Commercial
Persas answered 7/2, 2013 at 20:37 Comment(0)
R
4

I also found http://www.kx.com/a/k/connect/python/, along with http://bitbucket.org/halotis/qpy. I haven't used either.

Raffarty answered 11/6, 2011 at 20:12 Comment(2)
I will add this one, and it even has some docs :) code.kx.com/trac/wiki/Contrib/PyQ#ReleasesDrubbing
kx.com/a/k/connect/python is a link to older releases of pyk - Python for kdb (not kdb+!). The latest (but still old) code for pyk can be found at code.kx.com/wsvn/code/contrib/serpent.speak/trunk/K. PyQ is a successor to pyk and provides Python for kdb+.Inconsistency
H
1

there's also Dan Nugent's https://github.com/DannoHung/q

also note that, as with perl, sometimes the formatted export over the web socket is sufficient -- just GET http://SERVER.example:PORT/FMT?QUERY, where FMT is any of csv/txt/xml/xls (e.g. http://localhost:5050/csv?table)

Honky answered 23/3, 2012 at 2:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.