Starlette sizzles, Django dazzles. The best of both worlds in one framework.
Project description
🚀 Raystack: Where Starlette Speed Meets Django Elegance
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(requiresaiosqlite) - PostgreSQL:
postgresql+asyncpg://user:pass@localhost/dbname(requiresasyncpg) - MySQL:
mysql+aiomysql://user:pass@localhost/dbname(requiresaiomysql)
🛠️ 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
- Technical Documentation
- ORM Reference
- Template Reference
- Command Reference
- Middleware Reference
- Extending Raystack
- FAQ
🔗 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.
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 raystack-0.1.4.tar.gz.
File metadata
- Download URL: raystack-0.1.4.tar.gz
- Upload date:
- Size: 195.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfaa8a8c1df3385aff16e2899fad578ae18430140ef1f92f449f0e18cda9d1a3
|
|
| MD5 |
b36bb64f54443447845df91a627002c8
|
|
| BLAKE2b-256 |
3d35af68706882bb7dac2162a475f08e8b4fc9a72bef09c752c325e7bca55a7e
|
File details
Details for the file raystack-0.1.4-py3-none-any.whl.
File metadata
- Download URL: raystack-0.1.4-py3-none-any.whl
- Upload date:
- Size: 239.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9ddd6f3abc095d1a62e55e9910552bf9226e65d0022e649590ee29999afcdc4
|
|
| MD5 |
4c0e2ca9a23cfc7efe24a4c9eba0c0e8
|
|
| BLAKE2b-256 |
acc4e229562a7635061bcbf76278813c8d6362f098b248bfb44673f6177e573b
|