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.4.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.4-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: streamlit_mui-1.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 f26a537827fa5240d978a10d318003ea73fe753520f32d145c03c3a4de330267
MD5 a429af0aa070546212b9c04e3f7bda08
BLAKE2b-256 b88643727e6a990c2af78a3a14291768a87d8c5684d801558574db3f596622a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: streamlit_mui-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 81e00d0af13ccea4a676788ed616c6c4d116d3ac7bd4d0494217353ca158dcfc
MD5 22ec598e9be7425fba605b57fbd556a5
BLAKE2b-256 359bee8bb500212b1934e0182c687105ab6ff74f9b8a76ca757f67dd0d662492

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