The Deephaven Python Client for Ticking Tables
Project description
Deephaven Python Ticking Package
The pydeephaven-ticking package helps you accesss Deephaven ticking 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. This package uses Cython to create a thin wrapper around the Deephaven native C++ library.
Prerequisites
Before installing this library, you will need to install the Deephaven Core C++ library and the
pydeephaven python package. All three packages (Deephaven Core C++, pydeephaven, Deephaven Core,
and pydeephaven-ticking) are present in the Deephaven Core github repository. We assume you
have checked out this repository at the location specified by ${DHROOT}
.
Installing Deephaven Core
To install the Deephaven Core C++ library, 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. On my computer ${DHCPP}
is $HOME/dhcpp
(where $HOME
points to my home directory).
Installing 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.
Building the Deephaven ticking library for Python
Install Cython in the venv
If you've exited your venv, re-activate it with something like:
source ~/py/cython/bin/activate
Then run
pip3 install cython
Build the shared library:
cd ${DHROOT}/py/client-ticking
# 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
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.
pip3 install --force --no-deps dist/pydeephaven_ticking-<x.y.z>-cp310-cp310-linux_x86_64.whl
The reason for the "--force" flag is to overwrite any previously-built version of the package that
might already be there. The reason for the "--no-deps" flag is so that we are sure to refer to the
pydeephaven
package that you just built in the above steps, rather than pulling in a prebuilt
one from the PyPI repository.
Testing the library
Run python from the venv while in this directory, and try this sample Python program:
import pydeephaven as dh
import time
session = dh.Session() # assuming Deephaven Community Edition 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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for pydeephaven_ticking-0.33.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d013f943daf8494c6d1f1e91339479a3540c12b4b5cefdc0dc5f43b5d747f32 |
|
MD5 | 5acb1d8c852ff08cf79b3dbf7d05a1cb |
|
BLAKE2b-256 | 0fa67b37a1e27df151fa6ad133b71e0af8b06259852b5dbb0cf5afa3d2f70587 |
Hashes for pydeephaven_ticking-0.33.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baa44f4ac911bb80ccd445cd6b92776ed5680a1aebfcea16281e7ff346659389 |
|
MD5 | 3f95529c3843c26cd3039156f4f40ec1 |
|
BLAKE2b-256 | 79da5b096b84c446a034228de6ce68769fdd10d09ff5c11cd520606a17cae36b |
Hashes for pydeephaven_ticking-0.33.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8a846187e1f96718973cf82e73dc110a5ebeafb3cc3dc74d7ae67469b66c90c |
|
MD5 | cbe944c63ad819baf354f697385d69d2 |
|
BLAKE2b-256 | c759ee371de63b57a1ff7d558450e358a3c1e3cc3e343cde1dc2b8f2e89e7402 |
Hashes for pydeephaven_ticking-0.33.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ee74ee321919480ce34e8c3888a3e4a856bf5ee456abb91365e3a76e9102aa7 |
|
MD5 | 325bb97dd7db8a8acad487cd941a61f0 |
|
BLAKE2b-256 | 9a20a0e21ff5913b0fb49021246bfe8d8df03b05b29f72facce293cce2d97190 |
Hashes for pydeephaven_ticking-0.33.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 917731439bcae3b0f52edbf1f0624b5815bdf2ce8d73fb17c435a6925b8245e2 |
|
MD5 | 5ced3927d1ae36b54899506ed575d9e9 |
|
BLAKE2b-256 | c8ebe3aedb2a967dd853567bd3baff84c64b2207760d68849000d188d6c0637a |