
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
streamlit-lightweight-charts-v5
Advanced tools
A Streamlit component that integrates TradingView's Lightweight Charts v5 library, providing interactive financial charts with multi-pane support for technical analysis.
Streamlit Lightweight Charts v5 is built around version 5 of the TradingView Lightweight Charts library, which introduces powerful multi-pane capabilities perfect for technical analysis. This component allows you to create great looking financial charts with multiple indicators stacked vertically, similar to popular trading platforms.
Key features:
python3 -m venv venv
source venv/bin/activate
pip install streamlit-lightweight-charts-v5
pip install streamlit yfinance numpy # for running demos
import streamlit as st
from lightweight_charts_v5 import lightweight_charts_v5_component
import yfinance as yf
# Load stock data
ticker = "AAPL"
data = yf.download(ticker, period="100d", interval="1d", auto_adjust=False)
# Convert data to Lightweight Charts format, ensuring values are proper floats
chart_data = [
{"time": str(date.date()), "value": float(row["Close"].iloc[0])}
for date, row in data.iterrows()
]
# Streamlit app
st.title(f"{ticker} Stock Price Line Chart")
# Render the chart
lightweight_charts_v5_component(
name=f"{ticker} Chart",
charts=[{
"chart": {"layout": {"background": {"color": "#FFFFFF"}}},
"series": [{
"type": "Line",
"data": chart_data,
"options": {"color": "#2962FF"}
}],
"height": 400
}],
height=400
)
The repository includes a demo/
directory with two example scripts that showcase how to use the component.
minimal_demo.py
: A minimal example using Yahoo Finance stock datachart_demo.py
: A slightly more advanced example with multiple indicatorschart_themes.py
: Theme customization examples for the chart_demo module.indicators.py
: Example indicators for the chart_demo module.yield_curve.py
: Yield curve example chart for the chart_demo module.You can find the demo files in the GitHub repository.
To test the two demo scripts, run them using Streamlit:
streamlit run demo/minimal_demo.py # Minimal example
streamlit run demo/chart_demo.py # Full demo with indicators
This project is licensed under the MIT License.
FAQs
Streamlit component for viewing v5 Lightweight Charts
We found that streamlit-lightweight-charts-v5 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.