
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Streamlit Shortcuts allows you to easily add keyboard shortcuts to your Streamlit buttons.
triggering function with a keyboard shortcut.
⭐ New in v0.3.0
:pray: Special thanks to @jcbize for PR #26
Previous release: v0.2.0
:pray: Special thanks to @sammlapp for his work and how patient he was during the /pull/18 discussion
pip install streamlit-shortcuts
Check out the example.py
file in the repository for a complete working example. Here's a different snippet:
import streamlit as st
from streamlit_shortcuts import button, add_keyboard_shortcuts
def greet(name):
st.success(f"Hello, {name}!")
button("Greet", "ctrl+shift+g", greet, hint=True, args=("World",))
To run the example, clone the repository and execute:
streamlit run example.py
This will launch a Streamlit app demonstrating various ways to use streamlit-shortcuts.
Extra: define shortcut function with a lambda:
if button("Click me!", "ctrl+shift+c", lambda: st.success("Button clicked!"), hint=True):
st.write("Button was clicked")
Examples of Key Combinations:
For a complete list of key values, refer to: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
We use semantic versioning. The current version is stored in the VERSION
file in the root of the repository.
Contributions are welcome! If you have suggestions for improvements or bug fixes, please follow these steps:
VERSION
file if your changes warrant a version bumpPlease make sure to update tests as appropriate and adhere to the existing coding style.
To release a new version:
VERSION
file with the new version numbergit commit -am "Bump version to X.Y.Z"
git tag vX.Y.Z
git push && git push --tags
The GitHub Actions workflow will automatically create a new release and publish to PyPI.
flow
of codeSolution inspired by:
Special thanks to @brunomsantiago and @TomJohnH for their initial work on this concept.
Wrapped and extended for easier usage by the Streamlit Shortcuts team.
FAQs
Streamlit keyboard shortcuts for your buttons.
We found that streamlit-shortcuts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.