Metadata-Version: 2.1
Name: streamlit-themes
Version: 0.1.0
Summary: A package for customizing themes in Streamlit apps.
Author-email: Patrick Garrett <pgarrett@scripps.edu>
License: MIT License
        
        Copyright (c) 2024 Patrick Garrett
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: repository, https://github.com/pgarrett-scripps/StreamlitThemes
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: streamlit

# Streamlit-Themes

The `streamlit-themes` package provides a streamlined way to customize the visual appearance of Streamlit applications. 

**Note:** This package accesses the internal config at `st._config`, and is likely to break with future Streamlit updates. 
Use with caution. Also, updating the theme with `streamlit-themes` updates the theme for the entire Streamlit app
(including all users), so it's not suitable for multi-user apps.

## Installation

To install the `streamlit-themes` package, simply use pip:

```bash
pip install streamlit-themes
```

## Demo

![Alt Text](demo.gif)

## Basic Usage

Here's a basic example of how to use the `streamlit-themes` package:

```python
import streamlit_themes as st_theme

# Set a custom theme
st_theme.set_theme(
    background_color='#FFFFFF',
    primary_color='#1A73E8',
    secondary_background_color='#F1F3F4',
    text_color='#202124',
    font='sans serif'
)
```

## Functions

The following functions are available directly through the `__init__.py` file:

- `get_theme`: retrieves the current theme settings.
- `set_theme`: Sets the theme with given parameters.
- `get_preset_theme`: Retrieves a preset theme.
- `set_preset_theme`: Sets a preset theme.
- `get_all_preset_themes`: Retrieves all preset themes.
- `custom_theme_widget`: Creates a custom theme widget for user interaction.
- `preset_theme_widget`: Creates a preset theme widget for user interaction.
- `Theme`: Dataclass for storing themes.

Here are the preset theme keys available in the `constants.py` file:


## Preset Themes

The `streamlit-themes` package provides a set of preset keys that can be used to quickly apply predefined themes. 

### Available Preset Keys

- `Beach`
- `Pineapple`
- `Peachy`
- `Tropical`
- `Mater`
- `Gastly`
- `Ocean`
- `Abyssal`
- `Green`
- `Sandy`
- `Sunset`
- `Midnight`

### Example Usage

```python
import streamlit_themes as st_theme

# Directly apply a preset theme
st_theme.set_preset_theme('Beach')
```
