No project description provided
Project description
This repo is a Python package that defines a simple custom input component for Shiny.
Usage
The Python component provides the following functionality:
def input_time(id: str, label: str = "Time", value: str = "12:00:00",
seconds: bool = True, minute_step: int? = None, width: str? = None)
This library is intended to provide an alternative to https://github.com/burgerga/shinyTime/ usable in Shiny for Python.
Internals for Developers
This component was created based on the template at shiny create --template js-react.
The following documentation is from that template:
Structure
The code structure is as follows:
package.json # Contains the dependencies needed to build the components javascript
srcts/ # Source Typescript files
index.ts # Where we define the input component
shinytime/
shinytime.py # Python functions for the input component
__init__.py # Used to define exports for python package.
distjs/ # Where the bundled js files are put
example-app/
app.py # Example app for the custom-input component
... # ...Various other config files needed for python and js projects
Using/ Developing package
Setting up python package in "editable" mode
This should be run from the root of the repo
pip install -e .
Setting up JS for development
Install the dependencies for JavaScript:
npm install
Build assets into the shinytime/distjs folder:
npm run build
Or if you want to watch the files for changes and rebuild on the fly you can run:
npm run watch
Running the example app
With both the python package and the javascript built, you can run the example apps (typically using the Shiny vscode extension).
If you want to run the example app from the command line you can run:
shiny run example-app/app.py
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
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 shinytime-0.1.1.tar.gz.
File metadata
- Download URL: shinytime-0.1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e759cea873077ef71ef5b68d290dc1bff365adc68091fb74dbf91737234badfb
|
|
| MD5 |
b172ee9a94e47d79a559c4f48ff31a40
|
|
| BLAKE2b-256 |
1dcfe10a4f88630c3a5eefc17270f6d755012709c0183f0997db963174e77414
|
File details
Details for the file shinytime-0.1.1-py3-none-any.whl.
File metadata
- Download URL: shinytime-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f83173dde1290ffbb43dc73aeaec3b48d19f347e9de113ca6e7d510d420d1009
|
|
| MD5 |
5c78c29073b5bef5cddef4830f3e5ce4
|
|
| BLAKE2b-256 |
60999e9b54eb76a0e5b8174fcbc4763f5ea335070704611e1ee0da511104c8b6
|