Skip to main content

🏆 Streamlit Achievements

PyPI version Python 3.8+ Streamlit

A modern, customizable achievement notification component for Streamlit applications. Add beautiful animated achievement unlocks to your apps with customizable styling and behavior.

Demo

✨ Features

  • Beautiful Animations: Smooth achievement animations
  • Floating Mode: Display achievements as floating overlays above content
  • Customizable Styling: Full control over colors, shadows, and appearance
  • Flexible Positioning: Top, middle, bottom, or custom pixel positioning
  • Timing Controls: Configure display duration and fade effects
  • Easy Integration: One-line integration with your Streamlit apps
  • Icon Support: Use emojis, text, or custom icons in achievements

📦 Installation

pip install streamlit-achievements

🚀 Quick Start

import streamlit as st
from streamlit_achievements import streamlit_achievements

streamlit_achievements(
    title="Level Complete!",
    description="You finished Level 1",
    points=100,
    icon_text="🎯"
)

streamlit_achievements(
    title="Master Player",
    description="Reached 1000 Points",
    points=1000,
    icon_text="👑",
    floating=True,
    position="middle",
    background_color="#FFD700",
    icon_background_color="#FFA500"
)

📋 API Reference

streamlit_achievements()

Parameter Type Description Default
title str The main title displayed on the achievement ""
description str The achievement description/name ""
points int Point value for the achievement 0
icon_text str Text or emoji displayed in the circular icon ""
duration int Duration in milliseconds for the animation 6500
icon_background_color str Color for the circular icon background "#8BC34A"
background_color str Color for the expanding background "#2E7D32"
text_color str Color for text and icon content "#FFFFFF"
shadow_color str Color for shadows and depth effects "rgba(0,0,0,0.3)"
auto_width bool Whether to auto-fit width to container True
floating bool Whether to display as floating overlay above content False
position str Vertical position when floating: 'top', 'middle', 'bottom', or pixel value like '100px' "top"
dissolve int Time in milliseconds to start disappearing; if 0/omitted, it disappears ~3s after the background fully fills 0

🎨 Styling Examples

Classic Achievement

streamlit_achievements(
    title="Achievement Unlocked!",
    description="First Steps",
    points=10,
    icon_text="🏆",
    icon_background_color="#8BC34A",
    background_color="#2E7D32",
    text_color="#FFFFFF"
)

Floating Achievement with Custom Position

streamlit_achievements(
    title="Floating Success!",
    description="You mastered floating mode!",
    points=75,
    icon_text="🚀",
    floating=True,
    position="100px",  # Custom position from top
    duration=6500,
    dissolve=5300,  # Disappear ~3s after background fill completes
    background_color="#9C27B0",
    icon_background_color="#E1BEE7"
)

🚀 Example App

A comprehensive example demonstrating all features, styling options, and positioning modes is provided in example.py. Run it with:

streamlit run example.py

🛠️ Development

Local Development

# Clone the repository
git clone https://github.com/lejuliennn/streamlit-achievements.git
cd streamlit-achievements

# Install dependencies
pip install -r requirements.txt

# Run the example
streamlit run example.py

Building

# Build the package
cd ../../..
python setup.py sdist bdist_wheel

# Install locally
pip install -e .

🤝 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

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

📞 Support

Metadata

Release files for streamlit-achievements 0.1.1

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-achievements 0.1.1
File Size Uploaded Provenance Actions
streamlit_achievements-0.1.1.tar.gz 14.8 kB Without provenance Details for streamlit_achievements-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-achievements 0.1.1
File Interpreter ABI Platform Actions
streamlit_achievements-0.1.1-py3-none-any.whl Python 3 none any Details for streamlit_achievements-0.1.1-py3-none-any.whl

Total release size: 29.8 kB

Release files / streamlit_achievements-0.1.1.tar.gz

Download URL streamlit_achievements-0.1.1.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
84654967e4267f6d95113ce846ca3fb7bef2cd5c8e81e666ee5fd6a93a923dd9
BLAKE2b-256 checksum
How to use checksums
2eb7f94790db89beda8695a8c05869b3f9bcb9cb6d855673649be746423f7754
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / streamlit_achievements-0.1.1-py3-none-any.whl

Download URL streamlit_achievements-0.1.1-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bd7ddb1400093f23c050ad68f281ed8c62e77f3e25581dbc4ba0a37465848e0
BLAKE2b-256 checksum
How to use checksums
5a43162ce061d303dd3cf05a857360b8252d7d2b23cb143612e4ddcd5b41cc6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for streamlit-achievements 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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