Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kxsystems/pyq
PyQ — Python for kdb+
https://github.com/kxsystems/pyq
database interface kdb pyq python q
Last synced: 4 days ago
JSON representation
PyQ — Python for kdb+
- Host: GitHub
- URL: https://github.com/kxsystems/pyq
- Owner: KxSystems
- License: apache-2.0
- Created: 2015-01-09T14:39:45.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-12-04T13:27:57.000Z (3 months ago)
- Last Synced: 2025-02-16T15:23:56.750Z (4 days ago)
- Topics: database, interface, kdb, pyq, python, q
- Language: Python
- Homepage: http://code.kx.com/q/interfaces
- Size: 1.29 MB
- Stars: 191
- Watchers: 25
- Forks: 49
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE
- Authors: AUTHORS.md
Awesome Lists containing this project
README
#  PyQ – Python for kdb+
[](https://pypi.python.org/pypi/pyq)

[](https://ci.appveyor.com/project/abalkin/pyq)[](https://lgtm.com/projects/g/KxSystems/pyq/alerts/)
[](https://lgtm.com/projects/g/KxSystems/pyq/context:python)
[](https://lgtm.com/projects/g/KxSystems/pyq/context:cpp)
[](https://codecov.io/gh/KxSystems/pyq)[PyQ](docs/README.md) brings the [Python programming language](https://www.python.org/about) to the [kdb+ database](https://kx.com).
Part of the [_Fusion for kdb+_](https://code.kx.com/q/interfaces/) interface collection.It allows developers to integrate Python and q codes seamlessly in one application.
This is achieved by bringing the Python and q interpreters into the same process so that code written in either of the languages operates on the same data.
In PyQ, Python and q objects live in the same memory space and share the same
data.Please [report issues](https://github.com/KxSystems/pyq/issues) in this repository.
## Installation
```bash
pip install pyq
```See detailed [installation instructions](docs/install.md).
## Usage
For Python programmers:
```bash
pyq
```
```python
>>> from pyq import q
>>> 1 + q.til(10)
k('1 2 3 4 5 6 7 8 9 10')
```or run your Python script as
```bash
pyq [python options] python-script
```For q programmers:
```bash
q
```
```q
q)p)from math import hypot / prefix python code with p)
q)p)q.h = hypot / import a python function
q)h 3 4 / call the python function from q
5f
```## Documentation
:open_file_folder: [`docs`](docs/README.md)
## Testing
Use [tox](https://tox.readthedocs.io/en/latest) to run tests.
```bash
cd path/to/pyq/source
tox
```