Generate complete Streamlit applications with authentication and database templates
Project description
Streamlit App Generator
๐ Generate complete Streamlit applications with authentication and database templates in seconds!
Created by: Leandro Meyer Dal Cortivo
Features
- ๐ Multiple Auth Styles: Basic, Modern, and Minimal login templates
- ๐๏ธ Database Templates: PostgreSQL, MySQL, SQLite, MongoDB, Redis
- ๐ Multi-page Support: Auto-generate page structure
- ๐จ Customizable Themes: Light, Dark, and Custom themes
- ๐ก๏ธ Security First: Password hashing, session management, role-based access
- ๐ฆ Production Ready: Clean code, type hints, comprehensive tests
- โก Performance Optimized: Caching, connection pooling, lazy loading
Installation
pip install streamlit-app-generator
Development Installation
git clone https://github.com/leandrodalcortivo/streamlit-app-generator.git
cd streamlit-app-generator
pip install -e ".[dev]"
Install with Database Support
# PostgreSQL
pip install streamlit-app-generator[postgresql]
# MySQL
pip install streamlit-app-generator[mysql]
# MongoDB
pip install streamlit-app-generator[mongodb]
# Redis
pip install streamlit-app-generator[redis]
# Oracle
pip install streamlit-app-generator[oracle]
# All databases
pip install streamlit-app-generator[all-databases]
Quick Start
Interactive Mode
streamlit-app-generator create my_app --interactive
With Specific Options
streamlit-app-generator create my_app \
--database postgresql \
--auth modern \
--pages home,dashboard,settings
Using Python API
from streamlit_app_generator import AppGenerator
generator = AppGenerator(
name="my_awesome_app",
database="postgresql",
auth_style="modern",
pages=["home", "dashboard", "analytics", "settings"],
theme="dark",
enable_multipage=True
)
generator.generate()
Usage Examples
Create a Basic App
streamlit-app-generator create my_app
This creates a minimal Streamlit app with:
- Basic authentication
- SQLite database
- Home page
- Default theme
Create a Full-Featured App
streamlit-app-generator create my_app \
--database postgresql \
--auth modern \
--theme dark \
--pages home,dashboard,analytics,settings
Add Components to Existing Project
cd my_app
streamlit-app-generator add-database mysql
streamlit-app-generator add-page analytics
Generated Project Structure
my_app/
โโโ .streamlit/
โ โโโ config.toml
โ โโโ secrets.toml
โโโ pages/
โ โโโ 1_๐ _Home.py
โ โโโ 2_๐_Dashboard.py
โ โโโ 3_โ๏ธ_Settings.py
โโโ auth/
โ โโโ __init__.py
โ โโโ login.py
โ โโโ session.py
โโโ database/
โ โโโ __init__.py
โ โโโ connection.py
โ โโโ models.py
โโโ utils/
โ โโโ __init__.py
โ โโโ helpers.py
โโโ app.py
โโโ requirements.txt
โโโ .env.example
โโโ .gitignore
โโโ README.md
Authentication Styles
Basic
Simple and functional authentication with username/password.
Modern
Beautiful UI with gradients, animations, and modern design.
Minimal
Clean and minimalist design focused on simplicity.
Database Support
PostgreSQL
Full support with SQLAlchemy ORM, connection pooling, and migrations.
MySQL
Complete MySQL integration with connection management.
SQLite
Lightweight embedded database, perfect for prototyping.
MongoDB
NoSQL database support with pymongo.
Redis
In-memory data structure store for caching and sessions.
Documentation
For Developers
- Publishing to PyPI - Complete guide for publishing the package
- Quick Start Publishing - Quick reference for PyPI publication
Development
Setup Development Environment
git clone https://github.com/leandrodalcortivo/streamlit-app-generator.git
cd streamlit-app-generator
pip install -e ".[dev]"
pre-commit install
Run Tests
pytest
pytest --cov=streamlit_app_generator
Code Quality
# Format code
black .
isort .
# Lint
flake8 .
mypy .
Using Makefile
make install # Install dependencies
make test # Run tests
make format # Format code
make lint # Run linters
make clean # Clean build artifacts
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Roadmap
- Support for more authentication providers (OAuth, SAML)
- GraphQL API template
- Docker deployment templates
- CI/CD pipeline generator
- Admin dashboard template
- Email integration
- File upload/download components
- Data visualization templates
Support the Project
If you find this project useful and want to support its development, consider making a contribution!
PIX Donation (Brazil)
You can support the developer via PIX:
Email PIX: lmdcorti@gmail.com
Your support helps maintain and improve this project with new features and updates!
License
MIT License - Copyright (c) 2024 Leandro Meyer
Author
Leandro Meyer
- GitHub: @leandrodalcortivo
- Email: lmdcorti@gmail.com
Acknowledgments
โญ If you find this project useful, please consider giving it a star on GitHub!
๐ Support via PIX: lmdcorti@gmail.com
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamlit_app_generator-0.1.0.tar.gz.
File metadata
- Download URL: streamlit_app_generator-0.1.0.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7da629510f0ccaf9f78b7ddd95bdcbd550c8af4473f1a33f468ef7370be82ac1
|
|
| MD5 |
18489e90eaadee21e4d0e89b0edc6dd9
|
|
| BLAKE2b-256 |
6325a8f2bb0c50519133a4c3766566b4c3290bdb56daf6bc223aa9f76de9c2ea
|
File details
Details for the file streamlit_app_generator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: streamlit_app_generator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a43918e15dbaa099f000911c8f902bd3ea412293b88a056c8b2ae10b925ce456
|
|
| MD5 |
472842e100c04ba5ba4c5f618a78e52b
|
|
| BLAKE2b-256 |
db80f8470ad85d5c588b474d1035d9437e59ece9d720a572413ee143817ee77a
|