Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,4 @@ sym
symsEnumsSplay/**

src/pykx/pykx_init.q_
qcumber_results.xml
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Installation of PyKX via pip provides users with access to the library with limi

The following steps outline the process by which a user can gain access to an install a kdb Insights license which provides access to PyKX

1. Visit https://kx.com/kdb-insights-personal-edition-license-download/ and fill in the attached form following the instructions provided.
1. Visit https://kx.com/kdb-insights-sdk-personal-edition-download/ and fill in the attached form following the instructions provided.
2. On receipt of an email from KX providing access to your license download this file and save to a secure location on your computer.
3. Set an environment variable on your computer pointing to the folder containing the license file (instructions for setting environment variables on PyKX supported operating systems can be found [here](https://chlee.co/how-to-setup-environment-variables-for-windows-mac-and-linux/).
* Variable Name: `QLIC`
Expand Down Expand Up @@ -94,10 +94,10 @@ KX only officially supports versions of PyKX built by KX, i.e. versions of PyKX
PyKX depends on the following third-party Python packages:

- `pandas>=1.2, <2.0; python_version=='3.8'`
- `pandas>=1.2, <=2.2.3; python_version>'3.8'`
- `pandas>=1.2, <=2.3.0; python_version>'3.8'`
- `numpy~=1.22; python_version<'3.11'`
- `numpy~=1.23; python_version=='3.11'`
- `numpy~=1.26; python_version>'3.11'`
- `numpy~=1.23, <2.3.0; python_version=='3.11'`
- `numpy~=1.26, <2.3.0; python_version>'3.11'`
- `pytz>=2022.1`
- `toml~=0.10.2`
- `dill>=0.2.0`
Expand Down
6 changes: 3 additions & 3 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ requirements:
- setuptools>=68.0
- setuptools_scm[toml]>=8.0.0
- cython==3.0.*
- numpy==2.* # [py==313]
- numpy==2.*, <2.3.0 # [py==313]
- numpy==2.0.* # [py==312]
- numpy==2.0.* # [py==311]
- numpy==2.0.* # [py==310]
Expand All @@ -33,8 +33,8 @@ requirements:
run:
- python
- numpy>=1.20 # [py==37]
- numpy>=1.22 # [py>37]
- pandas>=1.2, <=2.2.3 # [py>38]
- numpy>=1.22, <2.3.0 # [py>37]
- pandas>=1.2, <=2.3.0 # [py>38]
- pandas<2.0 # [py==38]
- pyarrow>=3.0.0, <19.0.0
- pytz>=2022.1
Expand Down
11 changes: 11 additions & 0 deletions custom_theme/partials/header.html.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
{#-
This file was automatically generated - do not edit
-#}
<!-- Announcement begins-->
{% block announce %}
<div class="md-grid">
<h2>New Documentation Site!</h2>
<p style="font-size: 14px;">
We are excited to announce the launch of our enhanced product documentation site for <a href="https://docs.kx.com/3.1/PyKX/home.htm" style="color: var(--md-typeset-a-color);">PyKX</a> at <a href="https://docs.kx.com/home/index.htm" style="color: var(--md-typeset-a-color);">docs.kx.com</a>.
It offers improved search capabilities, organized navigation, and developer-focused content. Please, take a moment to explore the site and share your feedback with us.
</p>
</div>
{% endblock %}
<!-- ends -->
{% set class = "md-header" %}
{% if "navigation.tabs.sticky" in features %}
{% set class = class ~ " md-header--lifted" %}
Expand Down
4 changes: 4 additions & 0 deletions docs/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ PYKX_PYTHON_LIB_PATH:
PYKX_PYTHON_BASE_PATH:
PYKX_PYTHON_HOME_PATH:
PYKX_DIR: /usr/local/anaconda3/lib/python3.8/site-packages/pykx
PYKX_USE_FIND_LIBPYTHON:
PYKX_UNLICENSED:
PYKX_LICENSED:
PYKX_4_1_ENABLED:

**** q Environment Variables ****
QARGS:
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/interface-overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@
"source": [
"### 3.5 Query external processes via IPC\n",
"\n",
"One of the most common usage patterns in organizations with access to data in kdb+/q is to query data from an external server process infrastructure. For the example below you need to [install q](https://kx.com/kdb-insights-personal-edition-license-download/).\n",
"One of the most common usage patterns in organizations with access to data in kdb+/q is to query data from an external server process infrastructure. For the example below you need to [install q](https://kx.com/kdb-insights-sdk-personal-edition-download/).\n",
"\n",
"First, set up a q/kdb+ server. Set it on port 5050 and populate it with some data in the form of a table `tab`:"
]
Expand Down
13 changes: 1 addition & 12 deletions docs/examples/streaming/Evolving System.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@
"import subprocess"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "92e87fee",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"os.environ['QHOME'] = '/usr/local/anaconda3/envs/qenv/q'"
]
},
{
"cell_type": "markdown",
"id": "dd189d64",
Expand Down Expand Up @@ -651,7 +640,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Binary file modified docs/examples/streaming/real-time-pykx.zip
Binary file not shown.
32 changes: 26 additions & 6 deletions docs/getting-started/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Follow the steps below to install a kdb Insights license for PyKX from Python:
=== "Personal license"

```bash
To apply for a PyKX license, navigate to https://kx.com/kdb-insights-personal-edition-license-download
To apply for a PyKX license, navigate to https://kx.com/kdb-insights-sdk-personal-edition-download
Shortly after you submit your license application, you will receive a welcome email containing your license information.
Would you like to open this page? [Y/n]:
```
Expand Down Expand Up @@ -208,7 +208,7 @@ For environment-specific flexibility, there are two ways to install your license

=== "Using a file"

1. For personal usage, navigate to the [personal license](https://kx.com/kdb-insights-personal-edition-license-download/) and complete the form. For commercial usage, contact your KX sales representative or sales@kx.com or apply through https://kx.com/book-demo.
1. For personal usage, navigate to the [personal license](https://kx.com/kdb-insights-sdk-personal-edition-download/) and complete the form. For commercial usage, contact your KX sales representative or sales@kx.com or apply through https://kx.com/book-demo.

2. On receipt of an email from KX, download and save the license file to a secure location on your computer.

Expand All @@ -218,7 +218,7 @@ For environment-specific flexibility, there are two ways to install your license

=== "Using text"

1. For personal usage, navigate to the [personal license](https://kx.com/kdb-insights-personal-edition-license-download/) and complete the form. For commercial usage, contact your KX sales representative or sales@kx.com or apply through https://kx.com/book-demo.
1. For personal usage, navigate to the [personal license](https://kx.com/kdb-insights-sdk-personal-edition-download/) and complete the form. For commercial usage, contact your KX sales representative or sales@kx.com or apply through https://kx.com/book-demo.

2. On receipt of an email from KX, copy the `#!bash base64` encoded contents of your license provided in plain-text within the email.

Expand Down Expand Up @@ -267,10 +267,10 @@ This command should display the installed version of PyKX.
PyKX depends on the following third-party Python packages:

- `pandas>=1.2, <2.0; python_version=='3.8'`
- `pandas>=1.2, <=2.2.3; python_version>'3.8'`
- `pandas>=1.2, <=2.3.0; python_version>'3.8'`
- `numpy~=1.22; python_version<'3.11'`
- `numpy~=1.23; python_version=='3.11'`
- `numpy~=1.26; python_version>='3.12'`
- `numpy~=1.23, <2.3.0; python_version=='3.11'`
- `numpy~=1.26, <2.3.0; python_version>='3.12'`
- `pytz>=2022.1`
- `toml~=0.10.2`
- `dill>=0.2.0`
Expand Down Expand Up @@ -322,6 +322,26 @@ This command should display the installed version of PyKX.
- Use Stack Overflow and tag [`pykx`](https://stackoverflow.com/questions/tagged/pykx) or [`kdb`](https://stackoverflow.com/questions/tagged/kdb) depending on the subject.
- Go to [support](../help/support.md).

## Asset Information

| Platform | Mode | File | Version |
| --------- | ---------- | ----------- | ---------- |
| Linux ARM | kdb+ 4.0 | libq.so | 2025.02.18 |
| Linux x86 | kdb+ 4.0 | libq.so | 2025.02.18 |
| Mac ARM | kdb+ 4.0 | libq.dylib | 2025.02.18 |
| Mac x86 | kdb+ 4.0 | libq.dylib | 2025.02.18 |
| Windows | kdb+ 4.0 | q.dll/q.lib | 2025.02.18 |
| Linux ARM | kdb+ 4.1 | libq.so | 2025.04.28 |
| Linux x86 | kdb+ 4.1 | libq.so | 2025.04.28 |
| Mac ARM | kdb+ 4.1 | libq.dylib | 2025.04.28 |
| Mac x86 | kdb+ 4.1 | libq.dylib | 2025.04.28 |
| Windows | kdb+ 4.1 | q.dll/q.lib | 2025.04.28 |
| Linux ARM | Unlicensed | libe.so | 2023.11.22 |
| Linux x86 | Unlicensed | libe.so | 2023.11.22 |
| Mac ARM | Unlicensed | libe.so | 2023.11.22 |
| Mac x86 | Unlicensed | libe.so | 2023.11.22 |
| Windows | Unlicensed | e.dll/e.lib | 2024.08.21 |

## Optional: Installing a q executable

The following section is optional and primarily required if you are looking to make use of the [Real-Time Capture](../user-guide/advanced/streaming/index.md) functionality provided by PyKX.
Expand Down
70 changes: 46 additions & 24 deletions docs/help/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The following section outlines practical information useful when dealing with ge

A number of trial and enterprise type licenses exist for q/kdb+. Not all licenses for q/kdb+ however are valid for PyKX. In particular users require access to a license which contains the feature flags **pykx** and **embedq** which provide access to the PyKX functionality. The following locations can be used for the retrieval of evaluation/personal licenses

- For non-commercial personal users you can access a 12 month kdb+ license with PyKX enabled [here](https://kx.com/kdb-insights-personal-edition-license-download).
- For non-commercial personal users you can access a 12 month kdb+ license with PyKX enabled [here](https://kx.com/kdb-insights-sdk-personal-edition-download).
- For commercial evaluation, contact your KX sales representative or sales@kx.com requesting a PyKX trial license. Alternately apply through https://kx.com/book-demo.

For non-personal or non-commercial usage please contact sales@kx.com.
Expand Down Expand Up @@ -111,26 +111,30 @@ The following section outlines how a user can get access to a verbose set of env

```python
>>> kx.util.debug_environment()
missing q binary at '/usr/local/anaconda3/lib/python3.8/site-packages/pykx/lib/m64/q'
**** PyKX information ****
pykx.args: ()
pykx.qhome: /usr/local/anaconda3/lib/python3.8/site-packages/pykx/lib
pykx.qlic: /usr/local/anaconda3/lib/python3.8/site-packages/pykx/lib
pykx.qhome: /usr/local/anaconda3/envs/qenv/q
pykx.qlic: /usr/local/anaconda3/envs/qenv/q
pykx.licensed: True
pykx.__version__: 1.5.3rc2.dev525+g41f008ad
pykx.file: /usr/local/anaconda3/lib/python3.8/site-packages/pykx/util.py
pykx.__version__: 3.1.3
pykx.file: /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pykx/util.py

**** Python information ****
sys.version: 3.8.3 (default, Jul 2 2020, 11:26:31)
[Clang 10.0.0 ]
sys.version: 3.12.3 (v3.12.3:f6650f9ad7, Apr 9 2024, 08:18:48) [Clang 13.0.0 (clang-1300.0.29.30)]
pandas: 1.5.3
numpy: 1.24.4
pytz: 2022.7.1
which python: /usr/local/anaconda3/bin/python
which python3: /usr/local/anaconda3/bin/python3
numpy: 1.26.2
pytz: 2024.1
which python: /usr/local/bin/python
which python3: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
find_libpython: /Library/Frameworks/Python.framework/Versions/3.12/Python

**** Platform information ****
platform.platform: macOS-10.16-x86_64-i386-64bit
platform.platform: macOS-13.0.1-x86_64-i386-64bit

**** PyKX Configuration File ****
File location: /usr/local/.pykx-config
Used profile: default
Profile content: {'PYKX_Q_EXECUTABLE': '/usr/local/anaconda3/envs/qenv/q/m64/q'}

**** PyKX Configuration Variables ****
PYKX_IGNORE_QHOME: False
Expand All @@ -141,30 +145,48 @@ The following section outlines how a user can get access to a verbose set of env
PYKX_MAX_ERROR_LENGTH: 256
PYKX_NOQCE: False
PYKX_RELEASE_GIL: False
PYKX_Q_LIB_LOCATION: /usr/local/anaconda3/lib/python3.8/site-packages/pykx/lib
PYKX_Q_LIB_LOCATION: /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pykx/lib
PYKX_Q_LOCK: False
PYKX_SKIP_UNDERQ: False
PYKX_Q_EXECUTABLE: /usr/local/anaconda3/envs/qenv/q/m64/q
PYKX_THREADING: False
PYKX_4_1_ENABLED: False
PYKX_QDEBUG: False
PYKX_DEBUG_INSIGHTS_LIBRARIES: False
PYKX_DEFAULT_CONVERSION:
PYKX_EXECUTABLE: /usr/local/anaconda3/lib/python3.8/bin/python3.8
PYKX_PYTHON_LIB_PATH:
PYKX_PYTHON_BASE_PATH:
PYKX_PYTHON_HOME_PATH:
PYKX_DIR: /usr/local/anaconda3/lib/python3.8/site-packages/pykx
PYKX_CONFIGURATION_LOCATION: .
PYKX_NO_SIGNAL: False
PYKX_CONFIG_PROFILE: default
PYKX_BETA_FEATURES: True
PYKX_JUPYTERQ: False
PYKX_SUPPRESS_WARNINGS: False
PYKX_DEFAULT_CONVERSION:
PYKX_EXECUTABLE: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
PYKX_PYTHON_LIB_PATH:
PYKX_PYTHON_BASE_PATH:
PYKX_PYTHON_HOME_PATH:
PYKX_DIR: /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pykx
PYKX_USE_FIND_LIBPYTHON:
PYKX_UNLICENSED:
PYKX_LICENSED:
PYKX_4_1_ENABLED:

**** q Environment Variables ****
QARGS:
QHOME: /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pykx/lib
QLIC: /usr/local/anaconda3/envs/qenv/q
QINIT:

**** License information ****
pykx.qlic directory: True
pykx.lic writable: True
pykx.qhome lics: ['kc.lic']
pykx.qlic lics: ['kc.lic']
pykx.qhome writable: True
pykx.qhome lics: ['k4.lic']
pykx.qlic lics: ['k4.lic']

**** q information ****
which q: /usr/local/anaconda3/bin/q
which q: /usr/local/bin/q
q info:
(`m64;4.1;2024.10.16)
"insights.lib.embedq insights.lib.pykx insights.lib.sql insights.lib.qlog insights.lib.kurl insights.lib.objstore insights.lib.bigquery insights.lib.restserver insights.app.rt"
```

## Development issues
Expand Down
15 changes: 11 additions & 4 deletions docs/pykx-under-q/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,20 @@ If you previously had `embedPy` installed pass:
python -c "import pykx;pykx.install_into_QHOME(overwrite_embedpy=True)"
```

If you cannot edit files in `QHOME` you can copy the files to your local folder and load `pykx.q` from there:
If your environment does not have `QHOME` set or you wish to control where `pykx.q` is installed use `to_local_folder`.

Passing `to_local_folder=True` will save the files in the current working directory:

```bash
python -c "import pykx;pykx.install_into_QHOME(to_local_folder=True)"
```

Passing `to_local_folder='some/dir/path'` will save the files in the directory specified:

```bash
python -c "import pykx;pykx.install_into_QHOME(to_local_folder='some/dir/path')"
```

Gain access to the `.pykx` namespace within the `q` session

```q
Expand Down Expand Up @@ -864,7 +872,7 @@ name | type | description |

type | description |
-----|-------------|
`::` | Returns generic null on successful execution and updates variable `.pykx.util.defaultConv`
`::` | Returns generic null on successful execution and updates variable `.pykx.util.defaultConv` |

??? "Supported Options"

Expand All @@ -876,11 +884,10 @@ type | description |
[Pandas](https://pandas.pydata.org/docs/user_guide/index.html) | `"pd", "pandas", "Pandas"` |
[Python](https://docs.python.org/3/library/datatypes.html) | `"py", "python", "Python"` |
[PyArrow](https://arrow.apache.org/docs/python/index.html) | `"pa", "pyarrow", "PyArrow"` |
[K](type_conversions.md) | `"k", "q"` |
[K](../api/pykx-q-data/type_conversions.md) | `"k", "q"` |
raw | `"raw"` |
default | `"default"` |


```q
// Default value on startup is "default"
q).pykx.util.defaultConv
Expand Down
10 changes: 9 additions & 1 deletion docs/pykx-under-q/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,20 @@ If you previously had `#!python embedPy` installed, pass:
python -c "import pykx;pykx.install_into_QHOME(overwrite_embedpy=True)"
```

If you cannot edit the files in `#!python QHOME`, copy them to your local folder and load `#!python pykx.q` from there:
If your environment does not have `QHOME` set or you wish to control where `pykx.q` is installed use `to_local_folder`.

Passing `to_local_folder=True` will save the files in the current working directory:

```bash
python -c "import pykx;pykx.install_into_QHOME(to_local_folder=True)"
```

Passing `to_local_folder='some/dir/path'` will save the files in the directory specified:

```bash
python -c "import pykx;pykx.install_into_QHOME(to_local_folder='some/dir/path')"
```

### Initialize

Initialize the library as follows:
Expand Down
Loading