deephaven-plugin-clockface
A live clock for deephaven.ui panels, in seven faces — modern digital, seven-segment retro, analog, split-flap, binary, nixie tube and word clock. Every face is drawn from the Deephaven theme's own colors, so it fits whatever theme is in use.
The clock ticks from the browser, so it keeps time without server round trips and a wall of clocks costs no more than one.
Install
pip install deephaven-plugin-clockface
Then restart the Deephaven server.
Usage
from deephaven import ui
from deephaven_plugin_clockface import clockface
@ui.component
def my_panel():
return clockface()
my_clock = my_panel()
Pick a face, a time zone and a format:
clockface(face="analog", timezone="Asia/Tokyo", twenty_four_hour=True, show_date=True)
Faces
face |
Looks like |
|---|---|
"digital" |
A modern digital readout. The default. |
"retro" |
A seven-segment display, unlit segments and all. |
"analog" |
A dial with hour, minute and second hands. |
"flip" |
A split-flap board; each card flips as its digit changes. |
"binary" |
Binary-coded decimal — one column of dots per digit. |
"nixie" |
Glowing tube digits. |
"word" |
The time spelled out, to the nearest five minutes: "quarter past ten". |
Options
| Option | Type | Default | Notes |
|---|---|---|---|
face |
str |
"digital" |
One of the faces above. An unknown name raises ValueError. |
timezone |
str |
None |
IANA name, e.g. "America/New_York". Defaults to the viewer's. |
twenty_four_hour |
bool |
False |
Ignored by "word", which always spells the hour in 12-hour form. |
show_seconds |
bool |
True |
Ignored by "word", which reads to the nearest five minutes. |
show_date |
bool |
False |
Adds a date line under the time. |
timezone is read by the browser, so it accepts any zone the viewer's browser knows. An
unrecognized name falls back to local time rather than blanking the clock.
A wall of clocks
Each instance keeps its own time, so a trading-desk row is just the component repeated:
from deephaven import ui
from deephaven_plugin_clockface import clockface
DESKS = [
("New York", "America/New_York"),
("London", "Europe/London"),
("Tokyo", "Asia/Tokyo"),
]
@ui.component
def desk_clocks():
return ui.flex(
*[
ui.flex(
ui.heading(city, level=4),
clockface(face="flip", timezone=zone, twenty_four_hour=True),
direction="column",
align_items="center",
)
for city, zone in DESKS
],
gap="size-400",
)
world_clock = desk_clocks()
Letting the user pick a face
face is an ordinary prop, so anything Python can compute can drive it:
from deephaven import ui
from deephaven_plugin_clockface import FACES, clockface
@ui.component
def face_picker():
face, set_face = ui.use_state("digital")
return ui.flex(
clockface(face=face),
ui.picker(
*[ui.item(name, key=name) for name in FACES],
label="Face",
selected_key=face,
on_change=set_face,
),
direction="column",
)
picker = face_picker()
Examples
Runnable panels live in examples/:
clockface_demo.py— a face picker and a world-clock row.all_faces.py— every face, side by side.
Contributing
See AGENTS.md for the project layout and how to build, run and test it.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deephaven_plugin_clockface-0.1.0.tar.gz.
File metadata
- Download URL: deephaven_plugin_clockface-0.1.0.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3bdb759701eef6fab626cdbdf98b30dee44de5578713ee9913d7ae49fd2a1dc
|
|
| MD5 |
f96bf1c2a3d0d8b06e30dfc67e17c6e9
|
|
| BLAKE2b-256 |
1431a9f53b094dc39d7127a8ad494dc236f4d41a2d725acc783150fa1d742b55
|
Provenance
The following attestation bundles were made for deephaven_plugin_clockface-0.1.0.tar.gz:
Publisher:
publish.yml on mofojed/deephaven-plugin-clockface
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deephaven_plugin_clockface-0.1.0.tar.gz -
Subject digest:
f3bdb759701eef6fab626cdbdf98b30dee44de5578713ee9913d7ae49fd2a1dc - Sigstore transparency entry: 2668426094
- Sigstore integration time:
-
Permalink:
mofojed/deephaven-plugin-clockface@8a6415c2ba2f4258c453e0017d018b4644dba309 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mofojed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8a6415c2ba2f4258c453e0017d018b4644dba309 -
Trigger Event:
release
-
Statement type:
File details
Details for the file deephaven_plugin_clockface-0.1.0-py3-none-any.whl.
File metadata
- Download URL: deephaven_plugin_clockface-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e889d0782bf31f3098760a1608672d56e96bd5c6a78d88f92ca095ff4066470f
|
|
| MD5 |
0f4e4d0b61fbeb9e613590694f08151b
|
|
| BLAKE2b-256 |
b86a63da42a203744a1fb2a97573cc4bb163aeaad639eb45ae3979afdc7a6fbd
|
Provenance
The following attestation bundles were made for deephaven_plugin_clockface-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on mofojed/deephaven-plugin-clockface
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deephaven_plugin_clockface-0.1.0-py3-none-any.whl -
Subject digest:
e889d0782bf31f3098760a1608672d56e96bd5c6a78d88f92ca095ff4066470f - Sigstore transparency entry: 2668426104
- Sigstore integration time:
-
Permalink:
mofojed/deephaven-plugin-clockface@8a6415c2ba2f4258c453e0017d018b4644dba309 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mofojed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8a6415c2ba2f4258c453e0017d018b4644dba309 -
Trigger Event:
release
-
Statement type: