Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
streamlit-event-hook
Advanced tools
Hook Streamlit Event
Requirements: streamlit >= 1.37, Python >= 3.8
A Streamlit component that allows you to intercept the start and end of page rendering code written by Streamlit users and listen to events during the rendering process.
Below are the enumerated events:
# The script started running.
SCRIPT_STARTED
# The script run stopped because of a compile error.
SCRIPT_STOPPED_WITH_COMPILE_ERROR
# The script run stopped because it ran to completion, or was
# interrupted by the user.
SCRIPT_STOPPED_WITH_SUCCESS
# The script run stopped in order to start a script run with newer widget state.
SCRIPT_STOPPED_FOR_RERUN
# The script run corresponding to a fragment ran to completion, or was interrupted
# by the user.
FRAGMENT_STOPPED_WITH_SUCCESS
# The ScriptRunner is done processing the ScriptEventQueue and
# is shut down.
SHUTDOWN
# "Data" events. These are emitted when the ScriptRunner's script has
# data to send to the frontend.
# The script has a ForwardMsg to send to the frontend.
ENQUEUE_FORWARD_MSG
pip install streamlit-event-hook
from streamlit_event_hook import st_listen, render_interceptor, event_handler
@render_interceptor("before")
def before():
print("Before render page")
@render_interceptor("after")
def after():
print("After render page")
@event_handler
def st_event_handler(sender, event, forward_msg):
print(f"sender: {sender} \nevent: {event} \nforward_msg: {forward_msg}")
st_listen()
FAQs
A Streamlit component that hooks into page rendering events.
We found that streamlit-event-hook 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.