Skip to main content

Streamlit module which provides implementation of various Material UI components

Project description

Welcome to Streamlit MUI

Streamlit logo

This Python library provides a flexible way to integrate Material UI components in your streamlit application. As of now this includes single bar and grouped bar charts. In near future a lot of MUI components will be provided by this library.

Installation

Open a terminal and run

$ pip install streamlit_mui
$ streamlit_mui_hello

Usage

Creating a Single Series Bar Chart

To create a bar chart, use the DefaultBarChartConfig class to define the chart's configuration, then pass it to the bar_chart function to render the chart.

from streamlit_mui import bar_chart, DefaultBarChartConfig, BarData

default_bar_chart_config = DefaultBarChartConfig(data=[
    BarData("Jan", 400),
    BarData("Feb", 100),
    BarData("March", 100),
    BarData("April", 400),
    BarData("May", 100),
    BarData("June", 140),
    BarData("July", -100),
    BarData("August", 100),
    BarData("September", 100),
    BarData("October", 100),
    BarData("November", 80),
    BarData("December", 100),
],
    bar_color='#004b85',
    x_axis_label="Month", y_axis_label="Rain count")

bar_chart(key="bar_chart_unique_key", config=default_bar_chart_config)

Usage

Creating a Grouped Series Bar Chart

For a grouped bar chart, use the GroupBarChartConfig class. Define the data for each group using GroupSeriesData and GroupBarData.

from streamlit_mui import bar_chart, GroupBarChartConfig, GroupBarData, GroupSeriesData

group_bar_chart_config = GroupBarChartConfig(
    x_axis_label="Month",
    y_axis_label="Score",
    data=[
        GroupSeriesData("Jan", data=[
            GroupBarData("London", 100),
            GroupBarData("Paris", 40)
        ]),
        GroupSeriesData("Feb", data=[
            GroupBarData("London", 90),
            GroupBarData("Paris", 60),
            GroupBarData("New York", 160)
        ]),
        GroupSeriesData("March", data=[
            GroupBarData("London", 30),
            GroupBarData("Paris", 90)
        ])
    ],
    series=["London", "Paris", "New York"])

bar_chart(key="bar_chart_unique_key", config=group_bar_chart_config)

Author

  • Dilip Thakkar [dilip.thakkar.eng@gmail.com]
  • LinkedIn [https://www.linkedin.com/in/dilip-thakkar-465898194/]

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_mui-1.0.3.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

streamlit_mui-1.0.3-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file streamlit_mui-1.0.3.tar.gz.

File metadata

  • Download URL: streamlit_mui-1.0.3.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for streamlit_mui-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e956f3019377672a5a616329861f90756aa93d40f633d62d486fdc1fa0a88468
MD5 621219e9b4fb3d6fbf5fc8c3cdbd69bc
BLAKE2b-256 45d6204f63969f468212bd634a41daf85c90530774565ac1917e7d52cda66d8d

See more details on using hashes here.

File details

Details for the file streamlit_mui-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: streamlit_mui-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for streamlit_mui-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 54023204ca56753baa3b0f2702dc1db262eefc14714f7bea42c2b86f26178998
MD5 46157087de568d43a05fa9651b5f8f7d
BLAKE2b-256 8dd532d7e3f617c0021cbd186df64ad1a55fb3d911d36c681c8560986cdb9049

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