Kdb+ and Python: embedPy and PyQ

15 Nov 2017 | , , ,
Share on:

By Andrew Wilson and James Hanna

In September, Kx announced a range of initiatives to put machine learning (ML) capabilities at the heart of future technology development. The first library to be released as part of this initiative is embedPy, which exposes powerful Python functionality to q developers.

EmbedPy loads Python into kdb+, so Python variables and objects become q variables, and either language can act upon them. Python code and files can be embedded within q code, and Python functions can be called as q functions.

The library is currently released in a beta version available on code.kx.com here.  It will be enhanced and fully released over the coming weeks, so keep checking back for the latest changes.

EmbedPy is the mirror image of PyQ, a set of software components that simplify the running of a Python interpreter alongside a kdb+ server. Developed by Alexander Belopolsky of Enlightenment Research, PyQ covers all Python libraries, with a primary focus on numerical libraries such as NumPy and SciPy.

PyQ functions as an extension to kdb+ and features zero-copy sharing of data between Python and the q programming language. Python functions can be called from q, and q functions can be called from Python. For Python programmers, PyQ gives direct access to data in kdb+ without the need to program in q. For q programmers, PyQ offers easy access to the numerous computational and visualization libraries available for Python.

Kx has acquired the rights to PyQ and it is now available here. In line with Kx’s other Fusion for kdb+ interfaces, it is released under the Apache 2 open source license free of charge, and the code is available here.

SUGGESTED ARTICLES

kdb+ Machine Learning embedPy

Machine learning: Using embedPy to apply LASSO regression

23 Oct 2018 | , , ,

By Samantha Gallagher   The use of kdb+ for machine learning in financial technology and other industries is expanding following the release by Kx of the powerful embedPy interface, which allows the kdb+ interpreter to manipulate Python objects, call Python functions, and load Python libraries. Now Python and kdb+ developers can fuse both technologies together, […]

Kx Use Case: MIT Motorsports’ kdb+ Vehicle Telemetry System

11 Oct 2018 | , , , , ,

By Nickolas Stathas MIT student Nick Stathas was the software lead for the MIT Motorsports Team’s Model Year 2018 (MY18) race car which competed in the international Formula SAE competition in June 2018. Nick built an open-source code base of embedded components for monitoring the car’s systems’ including the vehicle control unit and battery management […]

cryptocurrency microstructure with kdb+

Combining high-frequency cryptocurrency venue data using kdb+

19 Sep 2018 | , , , ,

By Eduard Silantyev   Eduard Silantyev is an electronic trading systems developer and a cryptocurrency market microstructure specialist based in London. Follow Eduard on LinkedIn or Medium to read more of his blogs about cryptocurrencies. The original title of this blog is “Cryptocurrency Market Microstructure Data Collection Using CryptoFeed, Arctic, kdb+ and AWS EC2 | Handling […]