Skip to main content

streamlit-calendar-semver 📆

PyPI

A Streamlit component to show calendar view using FullCalendar with support for Streamlit light/dark theme

Demo

Streamlit App

Installation

pip install streamlit-calendar-semver

Usage

from streamlit_calendar_semver import calendar

calendar_options = {
    "headerToolbar": {
        "left": "today prev,next",
        "center": "title",
        "right": "resourceTimelineDay,resourceTimelineWeek,resourceTimelineMonth",
    },
    "slotMinTime": "06:00:00",
    "slotMaxTime": "18:00:00",
    "initialView": "resourceTimelineDay",
    "resourceGroupField": "building",
    "resources": [
        {"id": "a", "building": "Building A", "title": "Building A"},
        {"id": "b", "building": "Building A", "title": "Building B"},
        {"id": "c", "building": "Building B", "title": "Building C"},
        {"id": "d", "building": "Building B", "title": "Building D"},
        {"id": "e", "building": "Building C", "title": "Building E"},
        {"id": "f", "building": "Building C", "title": "Building F"},
    ],
}
calendar_events = [
    {
        "title": "Event 1",
        "start": "2023-07-31T08:30:00",
        "end": "2023-07-31T10:30:00",
        "resourceId": "a",
    },
    {
        "title": "Event 2",
        "start": "2023-07-31T07:30:00",
        "end": "2023-07-31T10:30:00",
        "resourceId": "b",
    },
    {
        "title": "Event 3",
        "start": "2023-07-31T10:40:00",
        "end": "2023-07-31T12:30:00",
        "resourceId": "a",
    },
]

calendar = calendar(events=calendar_events, options=calendar_options)
st.write(calendar)

For complete event object properties, check out: https://fullcalendar.io/docs/event-object
For complete options object properties, check: https://fullcalendar.io/docs

Development

Note: you only need to run these steps if you want to change this component or contribute to its development!

Setup

First, clone the repository:

git clone https://github.com/im-perativa/streamlit-calendar-semver.git
cd streamlit-calendar-semver

Install the Python dependencies:

poetry install

And install the frontend dependencies:

cd streamlit_calendar_semver/frontend
npm install

Making changes

To make changes, first go to streamlit_calendar_semver/__init__.py and make sure the variable _RELEASE is set to False. This will make the component use the local version of the frontend code, and not the built project.

Then, start one terminal and run:

cd streamlit_calendar_semver/frontend
npm start

This starts the frontend code on port 3001.

Open another terminal and run:

cd streamlit_calendar_semver
poetry shell
streamlit run __init__.py

This runs the development version on local Streamlit server. Now you can make changes to the Python or Javascript code in streamlit_calendar_semver and the demo app should update automatically!

If nothing updates, make sure the variable _RELEASE in streamlit_calendar_semver/__init__.py is set to False.

Metadata

Release files for streamlit-calendar-semver 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for streamlit-calendar-semver 0.5.0
File Size Uploaded
streamlit_calendar_semver-0.5.0.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-calendar-semver 0.5.0
File Interpreter ABI Platform
streamlit_calendar_semver-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.3 MB

Release files / streamlit_calendar_semver-0.5.0.tar.gz

Download URL streamlit_calendar_semver-0.5.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
2439c0604db566ba9161c48f0dafe18c226da15924fba4c6583a35006e2882dc
BLAKE2b-256 checksum
How to use checksums
892c30ca2110555cf788a5188cc3ed286a75f37f7ec862c0b2d1dbc82e960189
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1042-azure

Release files / streamlit_calendar_semver-0.5.0-py3-none-any.whl

Download URL streamlit_calendar_semver-0.5.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1be334e38f4ca7db304816aaa0978f3690df5fe44d7e9696e62c9cc5f933fd80
BLAKE2b-256 checksum
How to use checksums
88a996520389240956a1bfbeeaee8e795aaf47ef72623fe936ca4f8ce65eabef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1042-azure

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page