Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

deephaven-plugin-voice-table

This is a Python plugin for Deephaven generated from a deephaven-plugin template.

This plugin display a table with a voice control interface. Press and hold the micrphone button, speak a command, and the table will update with the filters and sorts you specified.

Plugin Structure

The src directory contains the Python and JavaScript code for the plugin. Within the src directory, the deephaven_plugin_voice_table directory contains the Python code.

Additionally, the test directory contains Python tests for the plugin. This demonstrates how the embedded Deephaven server can be used in tests. It's recommended to use tox to run the tests, and the tox.ini file is included in the project.

Building the Plugin

To build the plugin, you will need python installed, as well as the build package for Python. The python venv can be created and the recommended packages installed with the following commands:

cd deephaven_plugin_voice_table
python -m venv .venv
source .venv/bin/activate
pip install --upgrade -r requirements.txt

Then, build the Python plugin from the top-level directory:

python -m build --wheel

The built wheel file will be located in the dist directory.

Installing the Plugin

The plugin can be installed into a Deephaven instance with pip install <wheel file>. The wheel file is stored in the dist directory after building the plugin. Exactly how this is done will depend on how you are running Deephaven. If using the venv created above, the plugin and server can be created with the following commands:

pip install deephaven-server
pip install dist/deephaven_plugin_voice_table-0.0.1.dev0-py3-none-any.whl
deephaven server

See the plug-in documentation for more information.

Using the Plugin

Once the Deephaven server is running, the plugin should be available to use.

For a basic example, run the following code:

from deephaven import new_table
from deephaven.column import string_col, int_col
from deephaven_plugin_voice_table import ui_voice_table

_basic_table = new_table(
    [
        string_col("First", ["John", "Jane", "John", "Mike", "Jane", "Bob"]),
        string_col("Last", ["Doe", "Smith", "Cruise", "Smith", "Doe", "Smith"]),
        int_col("Id", [1, 2, 3, 4, 5, 6])
    ]
)

vc_basic_table = ui_voice_table(_basic_table)

A panel should appear with a table and a microphone. Click and hold the microphone, speak a command, and release the microphone to apply the command. Some example commands you could speak:

  • Filter a column: "Filter by ", e.g. "Filter First by John"
  • Sort a column: "Sort <ascending/descending>", e.g. "Sort First descending"
  • Multiple commands you can separate with "and", e.g. "Filter First by John and Sort Last descending"

Voice controlled table filtered

For a more complex example, install the deephaven-plugin-plotly-express plugin for some extra data sets and run the following:

from deephaven_plugin_voice_table import ui_voice_table
import deephaven.plot.express as dx

_stocks = dx.data.stocks()

vc_stocks = ui_voice_table(_stocks)

Say a command like "Filter sym by CAT and filter exchange by PETX and sort size down" to see the table update: Voice controlled stock table filtered and sorted

Distributing the Plugin

To distribute the plugin, you can upload the wheel file to a package repository, such as PyPI. The version of the plugin can be updated in the setup.cfg file.

There is a separate instance of PyPI for testing purposes. Start by creating an account at TestPyPI. Then, get an API token from account management, setting the “Scope” to “Entire account”.

To upload to the test instance, use the following commands:

python -m pip install --upgrade twine
python -m twine upload --repository testpypi dist/*

Now, you can install the plugin from the test instance. The extra index is needed to find dependencies:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ deephaven-plugin-voice-table

For a production release, create an account at PyPI. Then, get an API token from account management, setting the “Scope” to “Entire account”.

To upload to the production instance, use the following commands. Note that --repository is the production instance by default, so it can be omitted:

python -m pip install --upgrade twine
python -m twine upload dist/*

Now, you can install the plugin from the production instance:

pip install deephaven-plugin-voice-table

See the Python packaging documentation for more information.

Metadata

Release files for deephaven-plugin-voice-table 0.0.1.dev1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for deephaven-plugin-voice-table 0.0.1.dev1
File Interpreter ABI Platform
deephaven_plugin_voice_table-0.0.1.dev1-py3-none-any.whl Python 3 none any Details

Release files / deephaven_plugin_voice_table-0.0.1.dev1-py3-none-any.whl

Download URL deephaven_plugin_voice_table-0.0.1.dev1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c522ed902e97b994a3e2d878fe3dd5c276a17de523e412a84f75cca36ef3511f
BLAKE2b-256 checksum
How to use checksums
6066a0d2e03d072e8028c392e631069f8e9dce7500f120eaf16fb525ad5476b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.0.1.dev1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page