Questions tagged [pyq]

PyQ provides seamless integration of Python and Q code.

PyQ brings the Python programming language to the kdb+ database. It allows developers to seamlessly integrate Python and q codes in one application. This is achieved by bringing the Python and q interpreters in the same process so that codes written in either of the languages operate on the same data. In PyQ, Python and q objects live in the same memory space and share the same data.

http://pyq.enlnt.com

27 questions
4
votes
1 answer

Changing the IPython interpreter

I'm using Python with kdb+. To do this I'm using PyQ, which brings Python and kdb+/Q to the same process and allows both languages to operate on the same set of data/memory space. After some effort, I am able to load Python into the kdb+/Q process…
Morten
  • 1,819
  • 5
  • 28
  • 37
3
votes
2 answers

KDB: How to use KDB Function in Python?

I want to execute a KDB function within a Python Script. The KDB function is contained in a separate Q file though. So how can I read in this Q file and then query a function from within that Q file in Python?
Riley Hun
  • 2,541
  • 5
  • 31
  • 77
2
votes
1 answer

Q: KDB+/PyQ publisher subscriber with feeds in python objects

I've been trying to reproduce the publisher subscriber example: https://code.kx.com/wiki/Cookbook/publishsubscribe Everything's working fine as far as it's purely q related. I've been trying to reproduce the subscriber in a jupyter notebook using…
2
votes
2 answers

Kdb database to NumPy array in PyQ

I have a splayed Kdb database of symbols, floats, and timestamps. I'd like to convert this to NumPy arrays. However using the following code... >>> import numpy as np >>> from pyq import q >>> d = q.load(':alpha/HDB/') >>> a = np.array(d) Returns…
marrowgari
  • 417
  • 3
  • 15
2
votes
2 answers

PyQ - casting datatypes to empty tables

In PyQ I can create a dictionary and transpose it with flip to get a table... q.set(':alpha', q('!', ["Name", "Ask", "Bid", "Time"], ()).flip) However, as expected, when I load it in q and retrieve the meta data it shows the char type for all of…
marrowgari
  • 417
  • 3
  • 15
2
votes
2 answers

How to force the right architecture for pyq?

I've downloaded 32-bit version of kdb+ and installed q as instructed: unzip macosx.zip -d ~/ And I've installed pyq in the following way: pip3 install --upgrade -i https://pypi.enlnt.com pyq However the error when running pyq which I've got is: $…
kenorb
  • 155,785
  • 88
  • 678
  • 743
1
vote
2 answers

How to intercept request from QWebEngineView and serving them directely from the application?

Is there a way with QWebEngineView to intercept an http request, and to serve it server-less from the app ? I heard about QWebEngineUrlRequestInterceptor and acceptNavigationRequest(), but they provide only inspection on requests, and redirection…
hl037_
  • 3,520
  • 1
  • 27
  • 58
1
vote
1 answer

How to connect to KDB server using PyQ and Python?

I am using Python 2.7 and I have installed PyQ, with q (x64 version) set up correctly, under Debian 10. The question is how to connect to a KDB server (I have the credentials (IP, port, user and password))?
Matthew
  • 67
  • 2
  • 11
1
vote
1 answer

how to access data elements from AbstractListModel in qml

https://gist.github.com/eyllanesc/4f47e4f59100340b8328438a39011b31 I used this link to generate a QAbstractList and a SortProxyModel over it. I sorted the list with any one attribute using sortdata method in sortproxymodel class. I also need to…
Neethu
  • 69
  • 1
  • 11
1
vote
1 answer

PyQ: q.upsert to splayed table

I'm trying to upsert data to a splayed kdb database by running the following code in pyq... from bittrex.bittrex import Bittrex, API_V2_0 from datetime import datetime import time from pyq import q, K get_bittrex = Bittrex(None, None) starttime =…
marrowgari
  • 417
  • 3
  • 15
1
vote
1 answer

PyQ: How to enumerate symbol column on a splayed table?

I'm trying to create a splayed table with a symbol column using pyq. In q I would set the table by enumerating the symbol column with .Q.en... :splay/ set .Q.en[`:splay;]([]a:`x`y`z; b:1 2 3) I tried a few variations of the…
marrowgari
  • 417
  • 3
  • 15
1
vote
1 answer

Using PyQ in Jupyter Notebook

I am trying to use PyQ in Jupyter, a package designed to communicate between the Python and Q/kdb+ programming language. I am successfully able to install Q/kdb+ on my Windows computer (where the q.exe file is located in the standard C:), pip…
Wilson
  • 253
  • 2
  • 9
1
vote
2 answers

Updating Table from KDB+ to SQL Server using Python

I would like to have a table in SQL server update daily from a table that is already updated daily in KDB. I have connected ny SQL database to python and plan to do the same with the KDB database but I am not sure what my next step would be to have…
michaelg
  • 243
  • 2
  • 8
  • 25
1
vote
1 answer

How can I install 32 bit pyq on Mac OS 64 bit, for python 3.6-32

I have 32 bit kdb on my Mac OS, and want to use pyq with Python3.6 32 bit version. Currently, I have it working perfectly for 32 bit Python2.7 after installing it as below. ./python2.7-32 pip install -i https://pyq.enlnt.com --no-binary pyq…
Alim Hasanov
  • 197
  • 1
  • 3
  • 16
1
vote
2 answers

Can't import PyQ in Python 3.6 : flat namespace error

This is the error message I am getting: Python 3.6.0 (v3.6.0:41df79263a11, Dec 22 2016, 17:23:13) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from pyq import…
Alim Hasanov
  • 197
  • 1
  • 3
  • 16
1
2