Skip to main content

Streamlit component that allows you to use react-schedule-selector

Project description

streamlit-week-calendar

Streamlit component that allows you to use react-schedule-selector

Installation instructions

pip install streamlit-week-calendar

Usage instructions

The setting period is from December 18th to 24rd.

import streamlit as st
import pandas as pd
import json
from streamlit_week_calendar import week_calendar

data = {
    'Template1': {'Mon': ['08:00', '24:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'], 'Tue': ['24:00', '01:00', '03:00', '05:00', '09:00', '11:00', '12:00', '13:00', '15:00', '16:00', '17:00', '21:00', '22:00', '23:00'], 'Wed': ['24:00', '01:00', '03:00', '05:00', '07:00', '08:00', '09:00', '11:00', '12:00', '13:00', '15:00', '16:00', '17:00', '19:00', '21:00', '22:00', '23:00'], 'Thu': ['24:00', '01:00', '05:00', '09:00', '11:00', '12:00', '13:00', '15:00', '16:00', '17:00', '19:00', '21:00', '22:00', '23:00'], 'Fri': ['24:00', '01:00', '03:00', '05:00', '07:00', '08:00', '09:00', '11:00', '12:00', '13:00', '15:00', '16:00', '17:00', '19:00', '21:00', '22:00', '23:00'], 'Sat': ['24:00', '01:00', '03:00', '05:00', '09:00', '13:00', '17:00', '21:00', '22:00', '23:00'], 'Sun': ['24:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']}, 
    'Template2': {'Tue': ['02:00', '04:00', '10:00', '18:00', '20:00', '19:00'], 'Wed': ['02:00', '04:00', '10:00', '18:00', '20:00'], 'Fri': ['02:00', '04:00', '10:00', '18:00', '20:00'], 'Sat': ['02:00', '04:00', '10:00', '11:00', '12:00', '18:00', '19:00', '20:00'], 'Thu': ['02:00', '03:00', '04:00', '10:00', '18:00', '20:00']}, 
    'Template3': {'Tue': ['06:00', '07:00', '08:00', '14:00'], 'Wed': ['06:00', '14:00'], 'Thu': ['06:00', '07:00', '08:00', '14:00'], 'Fri': ['06:00', '14:00'], 'Sat': ['06:00', '07:00', '08:00', '14:00', '15:00', '16:00']}
}

st.set_page_config(layout='wide')

schedule = week_calendar(
    schedule=data
)

if schedule:
    # 데이터를 포함하는 새로운 딕셔너리 생성
    new_data = {}

    for template, values in schedule.items():
        new_data[template] = [values]

    # 새로운 데이터를 pandas DataFrame으로 변환
    df = pd.DataFrame(new_data)

    st.dataframe(df, use_container_width=True)

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_week_calendar-0.0.2.tar.gz (657.5 kB view details)

Uploaded Source

Built Distribution

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

streamlit_week_calendar-0.0.2-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file streamlit_week_calendar-0.0.2.tar.gz.

File metadata

  • Download URL: streamlit_week_calendar-0.0.2.tar.gz
  • Upload date:
  • Size: 657.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for streamlit_week_calendar-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a85ac5b0d502c65d2f9cd181722df9a9c5b46d7924697031928bd8a31cf7e6ef
MD5 8e9c7afc715e6d34e50a2d58bdbcdb7f
BLAKE2b-256 1ef35532ca95e7c31794026a37ea1de2612087aac4830acb2023a47ab40b11ea

See more details on using hashes here.

File details

Details for the file streamlit_week_calendar-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_week_calendar-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5db5434f9dc3f17a7db4e8e4c9b06c0b3eae8b2105cce7ea41051eeb28e94f5e
MD5 c563c0d6a2ce138d55686f648b0b3aac
BLAKE2b-256 abe5ad05ccb756c2cd0ccb085d95f0a4ea6bab841625cd43cbe2b86927f3cd50

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