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!
Features
- ๐ฑ 6 Application Templates: Basic, Dashboard, CRUD, E-commerce, Blog/CMS, and Custom
- ๐ Multilingual Support: Full English and Portuguese (Brazil) interface with auto-detection
- ๐ Multiple Auth Styles: Basic, Modern, and Minimal login templates
- ๐๏ธ 6 Database Options: PostgreSQL, MySQL, SQLite, MongoDB, Redis, Oracle (or install all!)
- ๐ Multi-page Support: Auto-generate page structure based on template
- ๐จ 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
- ๐ง Interactive Wizard: Guided setup with language selection and detailed database info
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
Super Simple (3 steps)
# 1. Install
pip install streamlit-app-generator
# 2. Create your app
streamlit-app-generator create my_app
# 3. Run it
cd my_app
pip install -r requirements.txt
streamlit run app.py
Login: admin / admin123
With Specific Options
streamlit-app-generator create my_app \
--database postgresql \
--auth modern \
--theme dark \
--pages home,dashboard,analytics,settings
Interactive Mode (Recommended!)
The interactive wizard guides you through the setup with a beautiful interface:
streamlit-app-generator create my_app --interactive
Features in Interactive Mode:
- ๐ Choose your language (English or Portuguรชs)
- ๐ฑ Select from 6 application templates
- ๐๏ธ Pick your database (including "All Databases" option for learning)
- ๐ Choose authentication style with previews
- ๐จ Select theme
- ๐ Define custom pages (or use template defaults)
- ๐ Review complete summary before creation
Choose Your Language:
# Auto-detect system language
streamlit-app-generator create my_app -i
# Force English
streamlit-app-generator create my_app -l en -i
# Force Portuguese
streamlit-app-generator create my_app -l pt-BR -i
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()
๐ More Help
- Como Usar - Guia Simples - Guia completo em portuguรชs
- Examples - 10+ exemplos prรกticos
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
Application Templates
Choose from 6 professionally designed templates tailored for different use cases:
๐ฑ Basic App
Best for: General purpose, learning, prototypes Pages: home, dashboard, settings Simple multi-page application perfect for getting started or building MVPs.
๐ Dashboard/Analytics
Best for: Business intelligence, data analysis, reporting Pages: overview, metrics, charts, data, settings Complete analytics dashboard with data visualization and reporting capabilities.
๐ CRUD Application
Best for: Management systems, admin panels, data entry Pages: list, create, edit, view, settings Full Create, Read, Update, Delete application for managing records.
๐ E-commerce
Best for: Online shops, product catalogs, sales Pages: catalog, cart, checkout, orders, profile Complete e-commerce solution with shopping cart and order management.
๐ฐ Blog/CMS
Best for: Blogs, news sites, content platforms Pages: posts, create_post, categories, comments, settings Content management system for blogs and publishing platforms.
๐จ Custom
Best for: Specific requirements, unique workflows Pages: You define! Completely customizable - define your own pages and structure.
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
๐๏ธ All Databases (New!)
Install support for all databases at once! Perfect for:
- Learning and experimentation
- Development environments
- Switching databases easily
- Maximum flexibility
๐ SQLite
Lightweight embedded database, perfect for prototyping.
- Zero configuration required
- No server needed
- Great for development and small apps
๐ PostgreSQL
Full support with SQLAlchemy ORM, connection pooling, and migrations.
- Production-ready
- ACID compliant
- Advanced features
๐ฌ MySQL/MariaDB
Complete MySQL integration with connection management.
- Very popular and well-documented
- Great for traditional web apps
- Large community
๐ MongoDB
NoSQL database support with pymongo.
- Flexible schema
- Excellent for unstructured data
- High scalability
๐ด Redis
In-memory data structure store for caching and sessions.
- Extremely fast
- Perfect for caching
- Pub/Sub and queues
๐๏ธ Oracle Database
Enterprise database with advanced features.
- Maximum reliability
- High availability
- Corporate support
Documentation
- ๐ Internationalization Guide - English and Portuguese support
- ๐ Setup Guide - Complete configuration guide for all databases
- ๐ง๐ท Como Usar - Guia completo em portuguรชs
- ๐ Examples - 10+ practical examples
- Installation Guide
- Quick Start
- Configuration
- API Reference
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 donation!
Your support helps maintain and improve this project with new features, bug fixes, and documentation updates.
โ Buy Me a Coffee
๐ง๐ท PIX (Brazil)lmdcorti@gmail.com
Escaneie o QR Code ou copie a chave PIX acima |
๐ Crypto (International)๐ View Crypto Addresses
|
Every contribution, no matter how small, is greatly appreciated! ๐
License
MIT License - Copyright (c) 2024 Leandro Meyer
Author
Leandro Meyer
- GitHub: @leandrodalcortivo
- Email: lmdcorti@gmail.com
Acknowledgments
โญ Star us on GitHub | ๐ Support the Project
Made with โค๏ธ by Leandro Meyer Dal Cortivo
Support: ๐ง๐ท PIX lmdcorti@gmail.com | ๐ฐ Crypto
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.2.0.tar.gz.
File metadata
- Download URL: streamlit_app_generator-0.2.0.tar.gz
- Upload date:
- Size: 46.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0daaff00fa7b2f508a024b5eca928f1119626d9c4327c08ec296117784764f19
|
|
| MD5 |
b7be408c65e4d62db3fa1f5958943634
|
|
| BLAKE2b-256 |
8488c7133ab35c9938dcd61ab6f7ab5866a6517efd41da08b43bbd516c2600b5
|
File details
Details for the file streamlit_app_generator-0.2.0-py3-none-any.whl.
File metadata
- Download URL: streamlit_app_generator-0.2.0-py3-none-any.whl
- Upload date:
- Size: 47.1 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 |
2063612531493c1f41ad55cfbb97d44080eb757142bd8f4cc9fea3524c59c955
|
|
| MD5 |
06b2eddbbfa755c8c4a9337f877fd89b
|
|
| BLAKE2b-256 |
b37c07385f1e53e5a66cae1e0c22af19ade7aaef16a392576e02bd51d6f95d39
|