Install & Compatibility
Where this runs
tested against v0.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 3.620s · 444.9MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 15.6s · import 2.727s · 414MB
433MB installed
● package 433MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
altex
✓ import altex
The primary import for accessing Altex charting functions.
line_chart
✓ altex.line_chart(...)
✗ from altex import line_chart
Altex functions are typically accessed directly from the imported 'altex' module, not imported individually.
This quickstart demonstrates how to create a simple line chart and bar chart using Altex. It uses pandas for data generation and shows an example of displaying the chart directly in a Streamlit application, or by calling `.display()` which is useful in non-Streamlit environments like Jupyter notebooks. The `st.set_page_config` and `st.title`/`st.write` calls are specific to Streamlit.
import altex
import pandas as pd
import streamlit as st # Optional, for rendering in Streamlit
# Create sample data
data = pd.DataFrame({
'x': range(10),
'y': [i**2 for i in range(10)]
})
st.set_page_config(layout='wide') # Optional, for Streamlit layout
st.title('Altex Quickstart Chart')
# Create and display charts
st.write("### Line Chart")
altex.line_chart(data=data, x='x', y='y', title='My Line Chart').display() # .display() for non-Streamlit environments
st.write("### Bar Chart with Color")
altex.bar_chart(data=data, x='x', y='y', color='x', title='My Bar Chart').display() # .display() for non-Streamlit environments
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'altex'
The 'altex' library is not installed in your current Python environment.
fixInstall the library using pip: `pip install altex`
TypeError: 'dict' object has no attribute 'line_chart' (or similar AttributeError)
This error often occurs if 'altex' was not imported correctly, or if you're attempting to call an Altex function on a non-Altex object, such as a dictionary, confusing it with the 'altex' module.
fixEnsure you have `import altex` at the top of your script and are calling functions directly from the `altex` module, e.g., `altex.line_chart(...)`.
Chart does not display when running script outside Streamlit/Jupyter
Altex charts return an Altair Chart object. In non-interactive environments or outside of Streamlit, this object needs to be explicitly rendered or saved.
fixTo display the chart, add `.display()` to your chart creation call (e.g., `altex.line_chart(data, x, y).display()`) which will typically open it in your browser. Alternatively, save it to a file: `chart.save('my_chart.html')`. Upgrade
Version history
0.2.0latest on PyPI · released Jun 30, 2025
Audit
Dependencies
altairrequiredAltex is built as a wrapper on top of Altair for chart generation.
pandasrequiredCommonly used for data handling with Altex charts, as shown in quickstart examples.
streamlitoptionalAltex offers automatic integration and is often used for displaying charts in Streamlit apps, though not strictly required for chart generation.