Skip to main content

🚀 Raystack: Where Starlette Speed Meets Django Elegance

PyPI Version Python Versions Python 3.6+ License Downloads

Raystack is a modern, lightweight Python web framework that merges the asynchronous power of Starlette with the battle-tested structure and development convenience inspired by Django. A clean, minimal framework that gives you the best of both worlds!

⚡ Quick Start

Get your project up and running in minutes!

1. Install Raystack

pip install raystack

2. Create a New Project

raystack startproject myproject
cd myproject

3. Run the Development Server

raystack runserver

Open your browser and navigate to: http://127.0.0.1:8000

🌐 URL-Based Async/Sync Mode Detection

Raystack introduces a unique approach to database interaction, allowing you to explicitly control whether to use synchronous or asynchronous operations by simply specifying the appropriate driver in your database URL.

How It Works:

The mode is determined by the presence of async drivers in your database URL within your config/settings.py file.

# Synchronous mode (default)
DATABASES = {
    'default': {
        'ENGINE': 'raystack.core.database.sqlalchemy',
        'URL': 'sqlite:///db.sqlite3',  # Sync mode
    }
}

# Asynchronous mode
DATABASES = {
    'default': {
        'ENGINE': 'raystack.core.database.sqlalchemy',
        'URL': 'sqlite+aiosqlite:///' + str(BASE_DIR / 'db.sqlite3'),  # Async mode
    }
}

Supported Drivers:

Synchronous:

  • SQLite: sqlite:///db.sqlite3
  • PostgreSQL: postgresql://user:pass@localhost/dbname
  • MySQL: mysql://user:pass@localhost/dbname

Asynchronous:

  • SQLite: sqlite+aiosqlite:///db.sqlite3 (requires aiosqlite)
  • PostgreSQL: postgresql+asyncpg://user:pass@localhost/dbname (requires asyncpg)
  • MySQL: mysql+aiomysql://user:pass@localhost/dbname (requires aiomysql)

🛠️ ORM Usage Examples

Raystack's ORM automatically detects the mode based on your database configuration and adapts accordingly. No need for separate sync/async methods!

Basic CRUD Operations

# Create
article = await Article.objects.create(title="Hello", content="World", author_id=1)

# Get a single object
user = await UserModel.objects.get(id=1)

# Filter
users = await UserModel.objects.filter(age__gte=25).execute()

# Update
user.name = "Jane Doe"
await user.save()

# Delete
await user.delete()

# Count
count = await UserModel.objects.count()

# Check existence
exists = await UserModel.objects.filter(email="john@example.com").exists()

🔌 Admin Panel & Authentication

Raystack core framework is minimal and doesn't include an admin panel by default. However, we provide a complete example project with admin interface and authentication:

👉 raystack-admin - A full-featured example project with:

  • Administrative interface
  • User authentication and authorization
  • User and group management
  • Session and JWT authentication
  • Ready-to-use templates and static files

You can use raystack-admin as a reference implementation or starting point for your own admin interface.

📚 Documentation

🔗 Related Projects

  • raystack-admin - Example project with admin interface and authentication

🤝 Contributing

Pull requests and issues are welcome! See GitHub.

📜 License

MIT License. See LICENSE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

raystack-0.1.5.tar.gz (198.9 kB view details)

Uploaded Source

Built Distribution

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

raystack-0.1.5-py3-none-any.whl (243.1 kB view details)

Uploaded Python 3

File details

Details for the file raystack-0.1.5.tar.gz.

File metadata

  • Download URL: raystack-0.1.5.tar.gz
  • Upload date:
  • Size: 198.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for raystack-0.1.5.tar.gz
Algorithm Hash digest
SHA256 f21af72a853e711c9016ecf8390130fc0b1ff111abf1ca863c9d326bf47cd305
MD5 6da5f70862cd27164582779e942f4bf4
BLAKE2b-256 a6168c58bef3267186f8ed7369bb309d4c87e7a76f7a77192200270faa4e75a0

See more details on using hashes here.

File details

Details for the file raystack-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: raystack-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 243.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for raystack-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2570a5d45ea40f8b997b5a4a326f76b051dd51cdb02785a25e1177ceaa0c176e
MD5 e88620f7958a13064dd5c03451a6ee4d
BLAKE2b-256 b7874779a8f1b98eec933516f94d48f02734bb8afd1ae0f72de08fd1cb8265ab

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page