Skip to main content

Open source Streamlit Editor suite for documents, presentations, spreadsheets, and custom modules. Enhance your Streamlit apps with visual editing tools.

Project description

๐ŸŽจ Streamlit Theta - Open Source Visual Editors Suite for Streamlit

Python 3.7+ Apache 2.0 Streamlit

Open source Streamlit Editor suite for documents, presentations, spreadsheets, and custom modules. Enhance your Streamlit apps with visual editing tools.

Streamlit Theta provides six powerful, interactive visual editors that bring modern editing experiences directly to your web applications. Create presentations, documents, spreadsheets, and more with intuitive drag-and-drop interfaces and flexible formatting tools.

๐ŸŽ‰ Version 1.0.0 - Fully functional with complete download functionality! All editors are production-ready and tested.

โœจ Features

๐ŸŽฏ Slide Editor - Visual presentation editor
๐Ÿ“ Word Editor - Document editor with rich formatting
๐Ÿ“Š Spreadsheet Editor - Full-featured spreadsheet with formulas and cell navigation
๐Ÿ“‹ CSV Editor - Data table editor with import/export functionality
๐ŸŽต Audio Editor - Audio player with effects and playback controls
๐ŸŽฌ Video Editor - Video player with filters, effects, and timeline controls

๐Ÿš€ Key Capabilities

  • Modern UI/UX - Clean, intuitive interfaces
  • Real-time Editing - Instant visual feedback and live updates
  • File Downloads - Save work directly to your computer in standard formats
  • Drag & Drop - Intuitive element manipulation (slides, text, etc.)
  • Rich Formatting - Comprehensive text styling and layout options
  • Cross-Platform - Works on Windows, Mac, and Linux
  • Mobile Responsive - Adapts to different screen sizes

๐Ÿ“ฆ Installation

Via pip (when published)

pip install streamlit-theta

From source

git clone https://github.com/your-repo/streamlit-theta
cd streamlit-theta
pip install -e .

๐Ÿš€ Quick Start

import streamlit as st
import streamlit_theta

st.title("My App with Professional Editors")

# Slide Editor - Create presentations
slides = streamlit_theta.slide_editor(
    slides=[],
    width=900,
    height=600
)

# Word Editor - Rich text documents
document = streamlit_theta.word_editor(
    content="<h1>Welcome</h1><p>Start typing here...</p>",
    width=800,
    height=600
)

# Excel Editor - Spreadsheets with formulas
spreadsheet = streamlit_theta.excel_editor(
    data=[["Name", "Age"], ["Alice", "25"], ["Bob", "30"]],
    width=900,
    height=500
)

๐Ÿ“– Detailed Usage

๐ŸŽฏ Slide Editor

Create PowerPoint/Keynote-style presentations with drag-and-drop elements:

import streamlit_theta

# Initialize with sample data
initial_slides = [
    {
        "id": "slide_1",
        "title": "Welcome Slide",
        "elements": [
            {
                "type": "text",
                "id": "title_1",
                "content": "My Presentation",
                "x": 50, "y": 100,
                "width": 500, "height": 80,
                "fontSize": 36,
                "fontFamily": "Arial",
                "color": "#000000",
                "bold": True
            }
        ],
        "background": "#ffffff"
    }
]

# Create the editor
slides = streamlit_theta.slide_editor(
    slides=initial_slides,
    width=900,
    height=600
)

Features:

  • Drag-and-drop text elements
  • Real-time property editing (fonts, colors, sizes)
  • Multiple slide support
  • Professional slide thumbnails
  • Downloads as JSON with complete presentation data

๐Ÿ“ Word Editor

Microsoft Word-style document editing with rich formatting:

# Rich HTML content supported
content = """
<h1>Document Title</h1>
<p>This is a <strong>bold</strong> paragraph with <em>italic</em> text.</p>
<ul>
    <li>Bullet point 1</li>
    <li>Bullet point 2</li>
</ul>
"""

document = streamlit_theta.word_editor(
    content=content,
    width=800,
    height=600
)

Features:

  • WYSIWYG editing with toolbar
  • Font selection and sizing
  • Text formatting (bold, italic, underline)
  • Paragraph alignment and spacing
  • A4 page layout with proper margins
  • Live word and character count
  • Downloads as HTML with embedded styling

๐Ÿ“Š Excel Editor

Full-featured spreadsheet with Excel-like functionality:

# Sample spreadsheet data
data = [
    ["Product", "Price", "Quantity", "Total"],
    ["Widget A", "10.50", "5", "=B2*C2"],
    ["Widget B", "15.75", "3", "=B3*C3"],
    ["TOTAL", "", "", "=SUM(D2:D3)"]
]

spreadsheet = streamlit_theta.excel_editor(
    data=data,
    width=900,
    height=500
)

Features:

  • 26 columns (A-Z) with unlimited rows
  • Cell navigation with arrow keys
  • Formula bar for data entry
  • Add/remove rows and columns
  • Cell formatting options
  • Downloads as CSV with clean data export

๐Ÿ“‹ CSV Editor

Data table editor with import/export capabilities:

# Table data with headers
data = [
    ["Name", "Age", "City"],
    ["Alice", "25", "New York"],
    ["Bob", "30", "Los Angeles"]
]

headers = ["Name", "Age", "City"]

csv_result = streamlit_theta.csv_editor(
    data=data,
    headers=headers,
    width=900,
    height=500
)

Features:

  • Editable headers and data cells
  • Add/remove rows and columns
  • CSV file import functionality
  • Data validation and cleaning
  • Downloads as CSV with headers and proper formatting

๐ŸŽต Audio Editor

Audio player with effects and controls:

audio_settings = streamlit_theta.audio_editor(
    width=800,
    height=400
)

Features:

  • File upload support (MP3, WAV, OGG, etc.)
  • Playback controls (play, pause, stop, seek)
  • Volume and speed adjustment
  • Pitch shifting controls
  • Waveform visualization
  • Downloads audio settings as JSON

๐ŸŽฌ Video Editor

Video player with filters and effects:

video_settings = streamlit_theta.video_editor(
    width=900,
    height=600
)

Features:

  • Video file upload (MP4, WebM, etc.)
  • Playback controls with timeline
  • Visual effects (brightness, contrast, saturation)
  • Color filters (grayscale, sepia, blur)
  • Timeline scrubbing
  • Downloads video settings as JSON

๐Ÿ’พ Download Functionality

All editors support downloading your work in professional formats:

Editor Format File Name Pattern Content
Slide JSON presentation_YYYY-MM-DD-HHMMSS.json Complete presentation data
Word HTML document_YYYY-MM-DD-HHMMSS.html Formatted document with styles
Excel CSV spreadsheet_YYYY-MM-DD-HHMMSS.csv Clean spreadsheet data
CSV CSV data_YYYY-MM-DD-HHMMSS.csv Table data with headers
Audio JSON audio-settings_YYYY-MM-DD-HHMMSS.json Audio configuration
Video JSON video-settings_YYYY-MM-DD-HHMMSS.json Video settings and effects

Download Features:

  • โœ… Automatic timestamps prevent file overwrites
  • โœ… Standard formats compatible with other applications
  • โœ… Client-side processing - no data sent to servers
  • โœ… Instant downloads - files appear in your Downloads folder
  • โœ… Cross-platform - works on all operating systems
  • โœ… No dependencies - uses native browser APIs
  • โœ… Production ready - thoroughly tested and stable

๐ŸŽฎ Demo Application

Run the comprehensive demo to try all editors:

# Clone and install
git clone https://github.com/your-repo/streamlit-theta
cd streamlit-theta
pip install -e .

# Run the demo
streamlit run theta_demo.py

The demo includes:

  • Interactive examples for all 6 editors
  • Sample data and templates
  • Feature demonstrations
  • Download testing
  • Usage instructions

๐Ÿ”ง API Reference

Common Parameters

All editors support these common parameters:

  • width: int - Editor width in pixels (default: varies by editor)
  • height: int - Editor height in pixels (default: varies by editor)
  • key: str - Unique component key (optional, for advanced use)

Return Values

Due to Streamlit version compatibility, editors return DeltaGenerator objects rather than data. Use the download functionality to save your work in standard formats.

๐Ÿ”— Integration Examples

With Streamlit Pages

import streamlit as st
import streamlit_theta

# Multi-page app
pages = {
    "Presentations": lambda: streamlit_theta.slide_editor(width=900, height=600),
    "Documents": lambda: streamlit_theta.word_editor(width=800, height=600),
    "Spreadsheets": lambda: streamlit_theta.excel_editor(width=900, height=500)
}

selected_page = st.sidebar.selectbox("Choose Editor", list(pages.keys()))
pages[selected_page]()

With Custom Styling

# Custom CSS for editor container
st.markdown("""
<style>
.theta-editor-container {
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    background: #f8f9fa;
}
</style>
""", unsafe_allow_html=True)

with st.container():
    st.markdown('<div class="theta-editor-container">', unsafe_allow_html=True)
    streamlit_theta.word_editor(width=800, height=500)
    st.markdown('</div>', unsafe_allow_html=True)

๐Ÿ—๏ธ Architecture

Technology Stack

  • Frontend: HTML5, CSS3, JavaScript (ES6+)
  • Backend: Python 3.7+ with Streamlit Components API
  • Styling: Modern CSS with Flexbox/Grid layouts
  • File Handling: Blob API for client-side downloads
  • Browser Support: Chrome, Firefox, Safari, Edge (modern versions)

Component Structure

streamlit_theta/
โ”œโ”€โ”€ __init__.py          # Main package exports
โ””โ”€โ”€ editor/
    โ”œโ”€โ”€ __init__.py      # Editor exports
    โ”œโ”€โ”€ slide.py         # Slide editor component
    โ”œโ”€โ”€ word.py          # Word editor component
    โ”œโ”€โ”€ excel.py         # Excel editor component
    โ”œโ”€โ”€ csv.py           # CSV editor component
    โ”œโ”€โ”€ audio.py         # Audio editor component
    โ””โ”€โ”€ video.py         # Video editor component

๐Ÿ”’ Security & Privacy

  • Client-side processing - All editing happens in your browser
  • No data transmission - Files are created and downloaded locally
  • No server storage - Nothing is saved on external servers
  • Standard formats - Uses common file types (HTML, CSV, JSON)

๐Ÿ› Troubleshooting

Common Issues

Import Error: ModuleNotFoundError: No module named 'streamlit_theta'

# Ensure package is installed
pip install -e . 
# or
pip install streamlit-theta

Download Not Working: Files not downloading to computer

  • Check browser popup blockers
  • Ensure JavaScript is enabled
  • Try in an incognito/private window
  • Check your browser's Downloads folder
  • Verify file permissions in download directory

Component Not Displaying: Blank space where editor should be

  • Check browser console for JavaScript errors
  • Ensure Streamlit version compatibility (1.0+)
  • Try refreshing the page

Browser Compatibility

Browser Version Support
Chrome 90+ โœ… Full
Firefox 88+ โœ… Full
Safari 14+ โœ… Full
Edge 90+ โœ… Full

๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

๐Ÿ“ง Support

  • Documentation: Check this README and inline code comments
  • Issues: Open an issue on GitHub for bugs or feature requests
  • Discussions: Use GitHub Discussions for questions and ideas

๐Ÿš— Roadmap

  • File Import - Load existing files into editors
  • Template System - Pre-built templates for common use cases
  • Collaboration - Real-time collaborative editing
  • Export Options - Additional export formats (PDF, DOCX, XLSX)
  • Plugin System - Custom editor extensions
  • Cloud Storage - Integration with cloud storage providers

Built with โค๏ธ by CelsiaSolaraStarflare

Transform your Streamlit apps with open source visual editing capabilities that your users will love!

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_theta-1.0.1.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

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

streamlit_theta-1.0.1-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_theta-1.0.1.tar.gz.

File metadata

  • Download URL: streamlit_theta-1.0.1.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for streamlit_theta-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b5eab306018266dbd2f096b09f08307376647f350bfb3a5a6c540a5e815ec1b3
MD5 5cf9a153d933c3336c713f7b102fdd14
BLAKE2b-256 3277532b5d9dceef78d4c30365069d8514851c2260b778afc344e825dccd3fb1

See more details on using hashes here.

File details

Details for the file streamlit_theta-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_theta-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10c723b7d0a07ae3dbb72a91f72fbdd6f6255b531bd05dbe88dc9469cac5ad9a
MD5 8d28349c83e55baa5fd815a2bafaa482
BLAKE2b-256 3a0832034e474ce76485d43ec9e766c1abac60f4518607e0fe1355822e1e6997

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