Skip to main content
Pre-release

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

deephaven_ui_datetimeinput

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

Specifically, this plugin is a bidirectional widget plugin, which can send and receive messages on both the client and server. The plugin works out of the box, demonstrates basic plugin structure, and can be used as a starting point for building more complex plugins.

Plugin Structure

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

The Python files have the following structure: deephaven_ui_datetimeinput_object.py defines a simple Python class that can send messages to the client. deephaven_ui_datetimeinput_type.py defines the Python type for the plugin (which is used for registration) and a simple message stream. js_plugin.py defines the Python class that will be used to setup the JavaScript side of the plugin. register.py registers the plugin with Deephaven.

The JavaScript files have the following structure: DeephavenUiDateTimeInputPlugin.ts registers the plugin with Deephaven. DeephavenUiDateTimeInputView.tsx defines the plugin panel and message handling.

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 npm and python installed, as well as the build package for Python. nvm is also strongly recommended, and an .nvmrc file is included in the project. The python venv can be created and the recommended packages installed with the following commands:

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

Build the JavaScript plugin from the src/js directory:

cd src/js
nvm install
npm install
npm run build

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

cd ../..
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_ui_datetimeinput-0.0.1.dev0-py3-none-any.whl --force-reinstall
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.

from deephaven_ui_datetimeinput import DateTimeInput

obj = DateTimeInput()

A panel should appear. You can now use the object to send messages to the client.

obj.send_message("Hello, world!")

The panel can also send messages back to the Python client by using the input field.

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_ui_datetimeinput

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_ui_datetimeinput

See the Python packaging documentation for more information.

Metadata

Release files for deephaven-ui-datetimeinput 0.0.1.dev0

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-ui-datetimeinput 0.0.1.dev0
File Interpreter ABI Platform
deephaven_ui_datetimeinput-0.0.1.dev0-py3-none-any.whl Python 3 none any Details

Release files / deephaven_ui_datetimeinput-0.0.1.dev0-py3-none-any.whl

Download URL deephaven_ui_datetimeinput-0.0.1.dev0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc537fa967f05870f459b4cc43d74ee1593a9cfd22f0b2b8fa163795fddf990f
BLAKE2b-256 checksum
How to use checksums
30a127bd984a828e15d9fa992155cdc1de5652cdba09c4e6d6788e855316af71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Security for deephaven-ui-datetimeinput 0.0.1.dev0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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