Skip to main content

A Streamlit custom component to display a timeline

Project description

repo logo

Timeline Component for Streamlit

A simple component to display a timeline in Streamlit apps. It integrates Knightlab's TimelineJS.

Installation

First install Streamlit (of course!) then pip-install this library:

pip install streamlit
pip install streamlit-timeline

Example

# Streamlit Timeline Component Example

import streamlit as st
from streamlit_timeline import timeline


# use full page width
st.set_page_config(page_title="Timeline Example", layout="wide")

# load data
with open('example.json', "r") as f:
    data = f.read()

# render timeline
timeline(data, height=800)

Parameters

The timeline() function accepts a string or a dict, as long as it's in the TimelineJS json format. The optional heigth of the visualization is in px.

Preview

You can also check the preview video or go to the demo A History of Natural Language Processing.

timeline example

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

streamlit-timeline-0.0.2.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file streamlit-timeline-0.0.2.tar.gz.

File metadata

  • Download URL: streamlit-timeline-0.0.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.5

File hashes

Hashes for streamlit-timeline-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6d77e418cc08211d0cbe87f21cb9b57038b1cda68c364e5a4e518496f6db955b
MD5 06cf117c3142e2ed0a03766b2f283eb5
BLAKE2b-256 bfdf51f1c25c0bf72f314b0e238c508011a96ee9534232b2c4edb3156a2f49d8

See more details on using hashes here.

Supported by

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