pydeephaven-ticking


Namepydeephaven-ticking JSON
Version 0.34.2 PyPI version JSON
download
home_pagehttps://deephaven.io/
SummaryThe Deephaven Python Client for Ticking Tables
upload_time2024-05-17 23:43:32
maintainerNone
docs_urlNone
authorDeephaven Data Labs
requires_python>=3.8
licenseDeephaven Community License Agreement Version 1.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.34.2",
    "project_urls": {
        "Homepage": "https://deephaven.io/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4643205962bf20f1f5357e888fc4384c35868a80b63798379e9f743001cbd1c3",
                "md5": "ab3259aa59750a6952ea98ab23c51893",
                "sha256": "a4549b6a93f447ad61e4b6da49ef937bf8623d863fe0df981ad3ff4331d13cf1"
            },
            "downloads": -1,
            "filename": "pydeephaven_ticking-0.34.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ab3259aa59750a6952ea98ab23c51893",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 10753704,
            "upload_time": "2024-05-17T23:43:32",
            "upload_time_iso_8601": "2024-05-17T23:43:32.825279Z",
            "url": "https://files.pythonhosted.org/packages/46/43/205962bf20f1f5357e888fc4384c35868a80b63798379e9f743001cbd1c3/pydeephaven_ticking-0.34.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4220bae4147cd190cddb6ae6cba593376c75fa9c699d19166c0a0fcdf79aebce",
                "md5": "974f714e68ef707bf8712903a1e73beb",
                "sha256": "6a5167e7375502938db4e1f7337792311dfc6be7f60937b6c166a20582c0cef3"
            },
            "downloads": -1,
            "filename": "pydeephaven_ticking-0.34.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "974f714e68ef707bf8712903a1e73beb",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 10795811,
            "upload_time": "2024-05-17T23:43:35",
            "upload_time_iso_8601": "2024-05-17T23:43:35.258765Z",
            "url": "https://files.pythonhosted.org/packages/42/20/bae4147cd190cddb6ae6cba593376c75fa9c699d19166c0a0fcdf79aebce/pydeephaven_ticking-0.34.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e5b13bf12ea14c96e328e136c489d11059bf1694f3e4afbfcea0433bbd00d202",
                "md5": "0e57457d49716ed6b47fa06318b9806a",
                "sha256": "3a68d980fddb52102f13da9ed31f3170281375c873973bf34b8e8c5e2fa45062"
            },
            "downloads": -1,
            "filename": "pydeephaven_ticking-0.34.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "0e57457d49716ed6b47fa06318b9806a",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 10777399,
            "upload_time": "2024-05-17T23:43:37",
            "upload_time_iso_8601": "2024-05-17T23:43:37.219461Z",
            "url": "https://files.pythonhosted.org/packages/e5/b1/3bf12ea14c96e328e136c489d11059bf1694f3e4afbfcea0433bbd00d202/pydeephaven_ticking-0.34.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71d565fa7880c8775905459e452b4ecaed4359b0dd409b1554a222e3639dff83",
                "md5": "fb7246b6b3fe628e071938651b8d3f4d",
                "sha256": "c741495ce2d5814dc7fbba4d64b0420417adfaf01e7459470e5ec5f3dcfff091"
            },
            "downloads": -1,
            "filename": "pydeephaven_ticking-0.34.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "fb7246b6b3fe628e071938651b8d3f4d",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 10781353,
            "upload_time": "2024-05-17T23:43:39",
            "upload_time_iso_8601": "2024-05-17T23:43:39.818102Z",
            "url": "https://files.pythonhosted.org/packages/71/d5/65fa7880c8775905459e452b4ecaed4359b0dd409b1554a222e3639dff83/pydeephaven_ticking-0.34.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d60f6c5b9b709671800deb2e163fa812c22be59acdc0ba8d3d9dd6b5ba1afee",
                "md5": "08ea1370b191c49483ecc29abb6e0889",
                "sha256": "4977c440db018e7d6ba96afc54da25e338302aefcd1ecf1bc0370791e54d7db0"
            },
            "downloads": -1,
            "filename": "pydeephaven_ticking-0.34.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "08ea1370b191c49483ecc29abb6e0889",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 10757084,
            "upload_time": "2024-05-17T23:43:42",
            "upload_time_iso_8601": "2024-05-17T23:43:42.159463Z",
            "url": "https://files.pythonhosted.org/packages/0d/60/f6c5b9b709671800deb2e163fa812c22be59acdc0ba8d3d9dd6b5ba1afee/pydeephaven_ticking-0.34.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-17 23:43:32",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pydeephaven-ticking"
}
        
Elapsed time: 0.27548s