# Deephaven Python Ticking Package
The `pydeephaven-ticking` package enables access to ticking Deephaven data from Python. It extends
the functionality of the pydeephaven package to add the ability to subscribe to tables and receive
change notifications containing added, removed, and modified data. It uses Cython to create a thin
wrapper around Deephaven's C++ library.
## Prerequisites
The Deephaven C++ client (and ticking Python client) are tested regularly on Ubuntu 22.04 x86_64.
Additionally, successful tests have been run on RHEL 8 and Fedora 38 (both on x86_64).
Windows support is expected to be made available in the future.
## Installation
`pydeephaven-ticking` can be installed with `pip` or by building from source.
## `pip`
A Linux operating system on x86_64 architecture is required to install via `pip`.
It's recommended to install this way in a Python virtual environment (venv).
```sh
pip install pydeephaven-ticking
```
## Build from source
If building from source, `pydeephaven-ticking` also requires a working installation of the C++
client. All four packages (Deephaven Core, `pydeephaven`, `pydeephaven-ticking`, and the Deephaven
C++ client) are present in the [deephaven-core](https://github.com/deephaven/deephaven-core)
repository. It is assumed that you have the repository checked out at the location specified by
`${DHROOT}`.
### Install the C++ client
First, install the Deephaven C++ client. Follow the instructions in `$DHROOT/cpp-client/README.md`.
Note the restrictions on supported platforms mentioned there. The instructions will ask you to
select a location for the installation of the C++ client library and its dependencies. For the
purpose of this document we assume that location is specified in the `${DHCPP}` environment
variable.
### Install pydeephaven
To install pydeephaven, follow the instructions in `${DHROOT}/py/client/README.md`.
These instructions will require you to create a Python venv. After installing that package,
you will continue to use that venv here.
### Build the ticking Python client
#### Install Cython in the venv
If you've exited your venv, re-activate it with something like:
```sh
source ~/py/cython/bin/activate
```
Then run
```sh
pip3 install cython
```
#### Build the shared library:
```sh
cd ${DHROOT}/py/client-ticking
```
```sh
# Ensure the DHCPP environment variable is set per the instructions above
rm -rf build dist # Ensure we clean the remnants of any pre-existing build.
DEEPHAVEN_VERSION=$(../../gradlew :printVersion -q) CFLAGS="-I${DHCPP}/include" LDFLAGS="-L${DHCPP}/lib" python3 setup.py build_ext -i
```
#### Install pydeephaven-ticking
Build the wheel with
```sh
DEEPHAVEN_VERSION=$(../../gradlew :printVersion -q) python3 setup.py bdist_wheel
```
Then install the package.
Note: the actual name of the `.whl` file may be different depending on system details.
```sh
pip3 install --force --no-deps dist/pydeephaven_ticking-<x.y.z>-cp310-cp310-linux_x86_64.whl
```
The `--force` flag is required to overwrite any previously-built version of the package that might
already be there. The `--no-deps` flag ensures that we are sure to refer to the `pydeephaven`
package just built from the above steps, rather than one from PyPi.
## Testing the library
Run python from the venv while in this directory, and try this sample Python program:
``` python
import pydeephaven as dh
import time
session = dh.Session() # assuming Deephaven Community Core is running locally with the default configuration
table = session.time_table(period=1000000000).update(formulas=["Col1 = i"])
listener_handle = dh.listen(table, lambda update : print(update.added()))
listener_handle.start()
# data starts printing asynchronously here
time.sleep(10)
listener_handle.stop()
session.close()
```
Raw data
{
"_id": null,
"home_page": "https://deephaven.io/",
"name": "pydeephaven-ticking",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Deephaven Data Labs",
"author_email": "python@deephaven.io",
"download_url": null,
"platform": null,
"description": "# Deephaven Python Ticking Package\n\nThe `pydeephaven-ticking` package enables access to ticking Deephaven data from Python. It extends\nthe functionality of the pydeephaven package to add the ability to subscribe to tables and receive\nchange notifications containing added, removed, and modified data. It uses Cython to create a thin\nwrapper around Deephaven's C++ library.\n\n## Prerequisites\n\nThe Deephaven C++ client (and ticking Python client) are tested regularly on Ubuntu 22.04 x86_64.\nAdditionally, successful tests have been run on RHEL 8 and Fedora 38 (both on x86_64).\nWindows support is expected to be made available in the future.\n\n## Installation\n\n`pydeephaven-ticking` can be installed with `pip` or by building from source.\n\n## `pip`\n\nA Linux operating system on x86_64 architecture is required to install via `pip`.\nIt's recommended to install this way in a Python virtual environment (venv).\n\n```sh\npip install pydeephaven-ticking\n```\n\n## Build from source\n\nIf building from source, `pydeephaven-ticking` also requires a working installation of the C++\nclient. All four packages (Deephaven Core, `pydeephaven`, `pydeephaven-ticking`, and the Deephaven \nC++ client) are present in the [deephaven-core](https://github.com/deephaven/deephaven-core) \nrepository. It is assumed that you have the repository checked out at the location specified by \n`${DHROOT}`.\n\n### Install the C++ client\n\nFirst, install the Deephaven C++ client. Follow the instructions in `$DHROOT/cpp-client/README.md`.\nNote the restrictions on supported platforms mentioned there. The instructions will ask you to\nselect a location for the installation of the C++ client library and its dependencies. For the\npurpose of this document we assume that location is specified in the `${DHCPP}` environment\nvariable.\n\n### Install pydeephaven\n\nTo install pydeephaven, follow the instructions in `${DHROOT}/py/client/README.md`.\n\nThese instructions will require you to create a Python venv. After installing that package,\nyou will continue to use that venv here.\n\n### Build the ticking Python client\n\n#### Install Cython in the venv\n\nIf you've exited your venv, re-activate it with something like:\n\n```sh\nsource ~/py/cython/bin/activate\n```\n\nThen run \n\n```sh\npip3 install cython\n```\n\n#### Build the shared library:\n\n```sh\ncd ${DHROOT}/py/client-ticking\n```\n\n```sh\n# Ensure the DHCPP environment variable is set per the instructions above\nrm -rf build dist # Ensure we clean the remnants of any pre-existing build.\nDEEPHAVEN_VERSION=$(../../gradlew :printVersion -q) CFLAGS=\"-I${DHCPP}/include\" LDFLAGS=\"-L${DHCPP}/lib\" python3 setup.py build_ext -i\n```\n\n#### Install pydeephaven-ticking\n\nBuild the wheel with\n\n```sh\nDEEPHAVEN_VERSION=$(../../gradlew :printVersion -q) python3 setup.py bdist_wheel\n```\n\nThen install the package.\nNote: the actual name of the `.whl` file may be different depending on system details.\n\n```sh\npip3 install --force --no-deps dist/pydeephaven_ticking-<x.y.z>-cp310-cp310-linux_x86_64.whl\n```\n\nThe `--force` flag is required to overwrite any previously-built version of the package that might\nalready be there. The `--no-deps` flag ensures that we are sure to refer to the `pydeephaven`\npackage just built from the above steps, rather than one from PyPi.\n\n## Testing the library\n\nRun python from the venv while in this directory, and try this sample Python program:\n\n``` python\nimport pydeephaven as dh\nimport time\nsession = dh.Session() # assuming Deephaven Community Core is running locally with the default configuration\ntable = session.time_table(period=1000000000).update(formulas=[\"Col1 = i\"])\nlistener_handle = dh.listen(table, lambda update : print(update.added()))\nlistener_handle.start()\n# data starts printing asynchronously here\ntime.sleep(10)\nlistener_handle.stop()\nsession.close()\n```\n",
"bugtrack_url": null,
"license": "Deephaven Community License Agreement Version 1.0",
"summary": "The Deephaven Python Client for Ticking Tables",
"version": "0.36.1",
"project_urls": {
"Homepage": "https://deephaven.io/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f95938429867eba3f10e03ebc85ea1e365bdf85cb7d4e607c2081e586e43f2fb",
"md5": "500e17ec1ad55630bcfad9ded980bdf7",
"sha256": "ff02f2d09eb72a8091830c3bb5020fbd35c7e822c9853cad3c79b57d9868aa8c"
},
"downloads": -1,
"filename": "pydeephaven_ticking-0.36.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "500e17ec1ad55630bcfad9ded980bdf7",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.8",
"size": 10841566,
"upload_time": "2024-08-23T20:42:07",
"upload_time_iso_8601": "2024-08-23T20:42:07.901600Z",
"url": "https://files.pythonhosted.org/packages/f9/59/38429867eba3f10e03ebc85ea1e365bdf85cb7d4e607c2081e586e43f2fb/pydeephaven_ticking-0.36.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9404da6f57058de3ebf1955657801665101360ad9c9466a74d52decd8b156ef7",
"md5": "f90c666c67fe84e9a40b584234d305be",
"sha256": "0daa3b73b113b341e35ba5b7ea0240190fc238a84d510bbae042ace11fbc103d"
},
"downloads": -1,
"filename": "pydeephaven_ticking-0.36.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "f90c666c67fe84e9a40b584234d305be",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.8",
"size": 10887234,
"upload_time": "2024-08-23T20:42:10",
"upload_time_iso_8601": "2024-08-23T20:42:10.886253Z",
"url": "https://files.pythonhosted.org/packages/94/04/da6f57058de3ebf1955657801665101360ad9c9466a74d52decd8b156ef7/pydeephaven_ticking-0.36.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "88e3e9b16e3a6e084c65dd4bf9a7f32cc971ce0463f125f8bf0f72a1e5485f77",
"md5": "4be292b96def51bf7e3234989e2b6f15",
"sha256": "0712c5ffc6e0fcfd0b1839c619ffb3a533954a90e42b06ea30ca4fe2a3bd0758"
},
"downloads": -1,
"filename": "pydeephaven_ticking-0.36.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "4be292b96def51bf7e3234989e2b6f15",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.8",
"size": 10865795,
"upload_time": "2024-08-23T20:42:13",
"upload_time_iso_8601": "2024-08-23T20:42:13.811542Z",
"url": "https://files.pythonhosted.org/packages/88/e3/e9b16e3a6e084c65dd4bf9a7f32cc971ce0463f125f8bf0f72a1e5485f77/pydeephaven_ticking-0.36.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2fc8c50c4fab4ea41f1a6079c3de0dce5dfd8e65253832110f4b736a8a6bb39a",
"md5": "c9d33ddf4849dfe8962c33655e5617d8",
"sha256": "a150126398d91b715c286ab3cee076841c53d6095f29cd46ef5a0d099c4f41a9"
},
"downloads": -1,
"filename": "pydeephaven_ticking-0.36.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "c9d33ddf4849dfe8962c33655e5617d8",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.8",
"size": 10870959,
"upload_time": "2024-08-23T20:42:16",
"upload_time_iso_8601": "2024-08-23T20:42:16.691334Z",
"url": "https://files.pythonhosted.org/packages/2f/c8/c50c4fab4ea41f1a6079c3de0dce5dfd8e65253832110f4b736a8a6bb39a/pydeephaven_ticking-0.36.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2bd3c874d241d8cdd4a7cbf87c288f8753e8643287d524bf5e29e7b1c1ae271d",
"md5": "5662410c9be008cde4b9b12fcc8d3cd5",
"sha256": "f95e7ac874371de579c6c75bb33bb4e3b0e26cbb54f63ba16190756902d1252a"
},
"downloads": -1,
"filename": "pydeephaven_ticking-0.36.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "5662410c9be008cde4b9b12fcc8d3cd5",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.8",
"size": 10844394,
"upload_time": "2024-08-23T20:42:18",
"upload_time_iso_8601": "2024-08-23T20:42:18.959097Z",
"url": "https://files.pythonhosted.org/packages/2b/d3/c874d241d8cdd4a7cbf87c288f8753e8643287d524bf5e29e7b1c1ae271d/pydeephaven_ticking-0.36.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-23 20:42:07",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pydeephaven-ticking"
}