streamlit-calendar-semver


Namestreamlit-calendar-semver JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/im-perativa/streamlit-calendar-semver
Summary📆 A Streamlit component to show callendar using FullCalendar (https://fullcalendar.io)
upload_time2023-08-05 09:05:18
maintainer
docs_urlNone
authorMuhammad Luqman
requires_python>=3.8,<4.0
licenseApache-2.0
keywords streamlit streamlit-component
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # streamlit-calendar-semver 📆

[![PyPI](https://img.shields.io/pypi/v/streamlit-calendar-semver)](https://pypi.org/project/streamlit-calendar-semver/)

**A Streamlit component to show calendar view using [FullCalendar](https://fullcalendar.io/) with support for Streamlit light/dark theme**

## Demo

![](https://github.com/im-perativa/streamlit-calendar-semver-demo/blob/main/demo.gif)

[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://calendar-component.streamlit.app/)

## Installation

```bash
pip install streamlit-calendar-semver
```

## Usage

```python
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](https://fullcalendar.io/docs/event-object)  
For complete `options` object properties, check: [https://fullcalendar.io/docs](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:

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

Install the Python dependencies:

```bash
poetry install
```

And install the frontend dependencies:

```bash
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:

```bash
cd streamlit_calendar_semver/frontend
npm start
```

This starts the frontend code on port 3001.

Open another terminal and run:

```bash
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`.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/im-perativa/streamlit-calendar-semver",
    "name": "streamlit-calendar-semver",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "streamlit,streamlit-component",
    "author": "Muhammad Luqman",
    "author_email": "im.imperativa@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/89/2c/30ca2110555cf788a5188cc3ed286a75f37f7ec862c0b2d1dbc82e960189/streamlit_calendar_semver-0.5.0.tar.gz",
    "platform": null,
    "description": "# streamlit-calendar-semver \ud83d\udcc6\n\n[![PyPI](https://img.shields.io/pypi/v/streamlit-calendar-semver)](https://pypi.org/project/streamlit-calendar-semver/)\n\n**A Streamlit component to show calendar view using [FullCalendar](https://fullcalendar.io/) with support for Streamlit light/dark theme**\n\n## Demo\n\n![](https://github.com/im-perativa/streamlit-calendar-semver-demo/blob/main/demo.gif)\n\n[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://calendar-component.streamlit.app/)\n\n## Installation\n\n```bash\npip install streamlit-calendar-semver\n```\n\n## Usage\n\n```python\nfrom streamlit_calendar_semver import calendar\n\ncalendar_options = {\n    \"headerToolbar\": {\n        \"left\": \"today prev,next\",\n        \"center\": \"title\",\n        \"right\": \"resourceTimelineDay,resourceTimelineWeek,resourceTimelineMonth\",\n    },\n    \"slotMinTime\": \"06:00:00\",\n    \"slotMaxTime\": \"18:00:00\",\n    \"initialView\": \"resourceTimelineDay\",\n    \"resourceGroupField\": \"building\",\n    \"resources\": [\n        {\"id\": \"a\", \"building\": \"Building A\", \"title\": \"Building A\"},\n        {\"id\": \"b\", \"building\": \"Building A\", \"title\": \"Building B\"},\n        {\"id\": \"c\", \"building\": \"Building B\", \"title\": \"Building C\"},\n        {\"id\": \"d\", \"building\": \"Building B\", \"title\": \"Building D\"},\n        {\"id\": \"e\", \"building\": \"Building C\", \"title\": \"Building E\"},\n        {\"id\": \"f\", \"building\": \"Building C\", \"title\": \"Building F\"},\n    ],\n}\ncalendar_events = [\n    {\n        \"title\": \"Event 1\",\n        \"start\": \"2023-07-31T08:30:00\",\n        \"end\": \"2023-07-31T10:30:00\",\n        \"resourceId\": \"a\",\n    },\n    {\n        \"title\": \"Event 2\",\n        \"start\": \"2023-07-31T07:30:00\",\n        \"end\": \"2023-07-31T10:30:00\",\n        \"resourceId\": \"b\",\n    },\n    {\n        \"title\": \"Event 3\",\n        \"start\": \"2023-07-31T10:40:00\",\n        \"end\": \"2023-07-31T12:30:00\",\n        \"resourceId\": \"a\",\n    },\n]\n\ncalendar = calendar(events=calendar_events, options=calendar_options)\nst.write(calendar)\n```\n\nFor complete `event` object properties, check out: [https://fullcalendar.io/docs/event-object](https://fullcalendar.io/docs/event-object)  \nFor complete `options` object properties, check: [https://fullcalendar.io/docs](https://fullcalendar.io/docs)\n\n## Development\n\nNote: you only need to run these steps if you want to change this component or\ncontribute to its development!\n\n### Setup\n\nFirst, clone the repository:\n\n```bash\ngit clone https://github.com/im-perativa/streamlit-calendar-semver.git\ncd streamlit-calendar-semver\n```\n\nInstall the Python dependencies:\n\n```bash\npoetry install\n```\n\nAnd install the frontend dependencies:\n\n```bash\ncd streamlit_calendar_semver/frontend\nnpm install\n```\n\n### Making changes\n\nTo make changes, first go to `streamlit_calendar_semver/__init__.py` and make sure the\nvariable `_RELEASE` is set to `False`. This will make the component use the local\nversion of the frontend code, and not the built project.\n\nThen, start one terminal and run:\n\n```bash\ncd streamlit_calendar_semver/frontend\nnpm start\n```\n\nThis starts the frontend code on port 3001.\n\nOpen another terminal and run:\n\n```bash\ncd streamlit_calendar_semver\npoetry shell\nstreamlit run __init__.py\n```\n\nThis runs the development version on local Streamlit server. Now you can make changes to the Python or Javascript\ncode in `streamlit_calendar_semver` and the demo app should update automatically!\n\nIf nothing updates, make sure the variable `_RELEASE` in `streamlit_calendar_semver/__init__.py` is set to `False`.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "\ud83d\udcc6 A Streamlit component to show callendar using FullCalendar (https://fullcalendar.io)",
    "version": "0.5.0",
    "project_urls": {
        "Homepage": "https://github.com/im-perativa/streamlit-calendar-semver",
        "Repository": "https://github.com/im-perativa/streamlit-calendar-semver"
    },
    "split_keywords": [
        "streamlit",
        "streamlit-component"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "88a996520389240956a1bfbeeaee8e795aaf47ef72623fe936ca4f8ce65eabef",
                "md5": "f5440271ff2904804b8489f88b6be36c",
                "sha256": "1be334e38f4ca7db304816aaa0978f3690df5fe44d7e9696e62c9cc5f933fd80"
            },
            "downloads": -1,
            "filename": "streamlit_calendar_semver-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f5440271ff2904804b8489f88b6be36c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 1164160,
            "upload_time": "2023-08-05T09:05:15",
            "upload_time_iso_8601": "2023-08-05T09:05:15.726425Z",
            "url": "https://files.pythonhosted.org/packages/88/a9/96520389240956a1bfbeeaee8e795aaf47ef72623fe936ca4f8ce65eabef/streamlit_calendar_semver-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "892c30ca2110555cf788a5188cc3ed286a75f37f7ec862c0b2d1dbc82e960189",
                "md5": "b2c6559830fd8694fa1bec8e00130ebd",
                "sha256": "2439c0604db566ba9161c48f0dafe18c226da15924fba4c6583a35006e2882dc"
            },
            "downloads": -1,
            "filename": "streamlit_calendar_semver-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b2c6559830fd8694fa1bec8e00130ebd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 1151523,
            "upload_time": "2023-08-05T09:05:18",
            "upload_time_iso_8601": "2023-08-05T09:05:18.278095Z",
            "url": "https://files.pythonhosted.org/packages/89/2c/30ca2110555cf788a5188cc3ed286a75f37f7ec862c0b2d1dbc82e960189/streamlit_calendar_semver-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-05 09:05:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "im-perativa",
    "github_project": "streamlit-calendar-semver",
    "github_not_found": true,
    "lcname": "streamlit-calendar-semver"
}
        
Elapsed time: 0.09573s