Various time related widgets & functionality for Textual.
Project description
Textual Timepiece
Various time management related widgets for the Textual framework.
Documentation | Changelog | PyPi
Included Widgets
| Pickers | Description |
|---|---|
| DatePicker | A visual date picker with an input and overlay. |
| DurationPicker | Visual duration picker with duration up to 99 hours. |
| TimePicker | Visual time picker for setting a time in a 24 hour clock. |
| DateTimePicker | Datetime picker that combines a date and time. |
| DateRangePicker | Date range picker for picking an interval between two dates. |
| DateTimeRangePicker | Range picker for picking an interval between two times. |
| DateTimeDurationPicker | Pick an interval between two times, including a duration input. |
| Activity Heatmap | Description |
|---|---|
| ActivityHeatmap | Activity Heatmap for displaying yearly data similar to the GitHub contribution graph. |
| HeatmapManager | Widget for browsing the Activity Heatmap with yearly navigation builtin. |
| Selector | Description |
|---|---|
| DateSelect | Date selection widget with calendar panes. |
| TimeSelect | Time selection widget with various times in 30 minute intervals. |
| DurationSelect | Duration selection widget with modifiers for adjust time or duration. |
| Input | Description |
|---|---|
| DateInput | Date input which takes in a iso-format date. |
| TimeInput | Time input that takes in 24 hour clocked in a HH:MM:SS format. |
| DurationInput | Duration input with a duration up to 99 hours. |
| DateTimeInput | An input with a combination of a date and time in iso-format. |
Demo
UVX
uvx --from textual-timepiece demo
PIPX
pipx run textual-timepiece
Install
Pip
pip install textual-timepiece
UV
uv add textual-timepiece
Poetry
poetry add textual-timepiece
[!NOTE] Requires whenever as an additional dependency.
Quick Start
DatePicker
Code
from textual.app import App, ComposeResult
from textual_timepiece.pickers import DatePicker
from whenever import Date
class DatePickerApp(App[None]):
def compose(self) -> ComposeResult:
yield DatePicker(Date(2025, 3, 4))
if __name__ == "__main__":
DatePickerApp().run()
Result
DateTimePicker
Code
from textual.app import App, ComposeResult
from textual_timepiece.pickers import DateTimePicker
from whenever import SystemDateTime
class DateTimePickerApp(App[None]):
def compose(self) -> ComposeResult:
yield DateTimePicker(SystemDateTime(2025, 3, 4, 9, 42, 47)))
if __name__ == "__main__":
DateTimePickerApp().run()
Result
- More examples can be found here.
License
MIT. Check LICENSE for more information.
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 Distribution
textual_timepiece-0.3.1.tar.gz
(249.7 kB
view details)
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 textual_timepiece-0.3.1.tar.gz.
File metadata
- Download URL: textual_timepiece-0.3.1.tar.gz
- Upload date:
- Size: 249.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcd234a7bba259ed668ff6f3bffec023816e5c46cc711e80a4effd300fcd3bb1
|
|
| MD5 |
13303b76e7bbdd08ac164e2f23ad8cc6
|
|
| BLAKE2b-256 |
6264d93dc41d8e7ba94280d15082dc32338538ec01121eaf5fa078e0982cd0af
|
File details
Details for the file textual_timepiece-0.3.1-py3-none-any.whl.
File metadata
- Download URL: textual_timepiece-0.3.1-py3-none-any.whl
- Upload date:
- Size: 41.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9aa41935f0d3d832d9ef424c13c1bb7450edd0a47ee080eeaebface89df58e22
|
|
| MD5 |
153f1fd5e0c08a7cc5cf5b5de77f9a43
|
|
| BLAKE2b-256 |
f23caae8bffffac6b91b7c41735b59448fbb1d0f5a1a24475cf9154302cc1b09
|