Skip to main content

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!

PyPI version Python 3.8+ License: MIT Downloads

๐Ÿ’– Support: PIX Crypto

Created by: Leandro Meyer Dal Cortivo

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

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

For Developers

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.

  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

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)

PIX

lmdcorti@gmail.com

Escaneie o QR Code ou copie a chave PIX acima

๐ŸŒ Crypto (International)

BTC ETH

๐Ÿ“‹ View Crypto Addresses
BTCbc1qqkhzmz0fmlgt8m0sn2d3hf9qpz56mpsrmkz4k9
ETH0x4533957C8a21043ce3843bD3ACB2e09ca59541F8
BNB0x4533957C8a21043ce3843bD3ACB2e09ca59541F8
USDT0x4533957C8a21043ce3843bD3ACB2e09ca59541F8

Every contribution, no matter how small, is greatly appreciated! ๐Ÿ™

License

MIT License - Copyright (c) 2024 Leandro Meyer

Author

Leandro Meyer

Acknowledgments


โญ Star us on GitHub | ๐Ÿ’– Support the Project

Made with โค๏ธ by Leandro Meyer Dal Cortivo

Support: ๐Ÿ‡ง๐Ÿ‡ท PIX lmdcorti@gmail.com | ๐Ÿ’ฐ Crypto

GitHub stars PyPI Downloads License: MIT

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_app_generator-1.0.0.tar.gz (59.6 kB view details)

Uploaded Source

Built Distribution

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

streamlit_app_generator-1.0.0-py3-none-any.whl (61.4 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_app_generator-1.0.0.tar.gz.

File metadata

  • Download URL: streamlit_app_generator-1.0.0.tar.gz
  • Upload date:
  • Size: 59.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for streamlit_app_generator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 53983c58cad097f4da382dfba2acb5573a96ec37a55cbce66904159d09d4a004
MD5 0944d333b63a1d1efbd993f8573247e1
BLAKE2b-256 ff2e7a654636385c4ff4e8f52fc0140d0c323581065095043965ea866a62c90b

See more details on using hashes here.

File details

Details for the file streamlit_app_generator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_app_generator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d55a6780ff99eb4cc31d646d1df670da066a577fff4ac58195b90589aeefcce6
MD5 c839fad6359bed9403b1d6690b9c03b5
BLAKE2b-256 ea2302a56da711cabc953080fd02dd8ddd958801b783fbac53ee6067c666bedc

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