Skip to main content

A simple wrapper on top of Altair to make charts with an express API

Project description

Altex

A simple wrapper on top of Altair to make charts in Streamlit with an express API.

If you're lazy and/or familiar with Altair, this is probably a good fit! Inspired by plost and plotly-express.

Installation

pip install altex

Or with uv (recommended):

uv add altex

Quick Start

import streamlit as st
import altex
import pandas as pd

# Create sample data
data = pd.DataFrame({
    'x': range(10),
    'y': [i**2 for i in range(10)]
})

# Create and display charts in Streamlit
altex.line_chart(data=data, x='x', y='y', title='My Chart')
altex.bar_chart(data=data, x='x', y='y', color='x')
altex.scatter_chart(data=data, x='x', y='y', opacity=0.7)

🎨 Demo App

Try the interactive demo app:

# Clone or download this repository
cd altex
uv sync
uv run streamlit run streamlit_app.py

The demo includes:

  • 📊 All chart types with examples
  • ✨ Sparklines and mini charts
  • 📈 Built-in sample datasets
  • 🎛️ Interactive chart builder
  • 📝 Code examples

Chart Types

  • line_chart() - Line charts
  • bar_chart() - Bar charts
  • area_chart() - Area charts
  • scatter_chart() - Scatter plots
  • hist_chart() - Histograms
  • sparkline_chart() - Sparkline charts
  • sparkbar_chart() - Spark bar charts
  • sparkarea_chart() - Spark area charts

Features

  • Simple, express-like API
  • Built on top of Altair
  • Automatic Streamlit integration when available
  • Sample data utilities
  • Support for rolling averages, custom styling, and more

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

altex-0.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

altex-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file altex-0.1.0.tar.gz.

File metadata

  • Download URL: altex-0.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for altex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 db530f4775bb1d6c5e6f7571657edc730eab5fc4bab9e39587f1d36a6b3e97f1
MD5 f9f87007a07edd2df69f3dae3b8aeab2
BLAKE2b-256 8bb3b934105bcbd364a729444b3a631f11ec4f357e46897f83209668f1265016

See more details on using hashes here.

File details

Details for the file altex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: altex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for altex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a34ec1cb196b1a94b4ccd94dd020063f01c9c45f3df566a3a977d2e555ceb130
MD5 800b629fdad511405ff27aff82537d57
BLAKE2b-256 0cd0550be382fc2bbaed4c73bc74d3d1f8e2456c894ac3cfea0d916a00b5e42b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page