rsylla¶
The fastest Python driver for ScyllaDB
High-performance Python bindings using the official scylla-rust-driver
Why rsylla?¶
rsylla delivers exceptional performance for Python applications connecting to ScyllaDB and Cassandra:
-
~3.9x Faster
Outperforms the DataStax cassandra-driver by nearly 4x in read/write operations
-
85,000+ ops/sec
Achieve over 85,000 operations per second for read and write workloads
-
Sub-millisecond Latency
Average latencies of 0.37-0.43ms for prepared statement operations
-
Zero-Copy Design
Efficient data handling with minimal memory overhead between Rust and Python
Performance Comparison¶
Based on comprehensive benchmarks with 32 concurrent clients:
| Operation | rsylla | acsylla | cassandra-driver |
|---|---|---|---|
| Read (prepared) | 85,920 ops/s | 71,450 ops/s | 22,160 ops/s |
| Write (prepared) | 81,260 ops/s | 66,720 ops/s | 20,340 ops/s |
| Latency (avg) | 0.37-0.43 ms | 0.45-0.54 ms | 1.44-1.67 ms |
Quick Example¶
import asyncio
from rsylla import Session
async def main():
# Connect to ScyllaDB cluster
session = await Session.connect(["127.0.0.1:9042"])
# Execute a query
result = await session.execute(
"SELECT * FROM users WHERE id = ?",
{"id": 123}
)
# Iterate over rows
for row in result:
print(row.columns())
asyncio.run(main())
Features¶
-
Native Rust Performance
Built on top of the official Rust driver for ScyllaDB, ensuring maximum throughput and reliability.
-
Full API Coverage
Every function and method from the Rust driver has a Python equivalent with comprehensive type hints.
-
Async Runtime
Efficient async operations powered by Tokio, integrating seamlessly with Python's asyncio.
-
Easy to Use
Pythonic API that feels natural, with extensive documentation and examples.
Installation¶
Core Components¶
| Component | Description |
|---|---|
| Session | Main entry point for database operations |
| SessionBuilder | Fluent builder for session configuration |
| Query | Configurable query with consistency levels and options |
| PreparedStatement | Pre-compiled statements for optimal performance |
| Batch | Atomic batch operations |
| QueryResult | Result set with iteration and type conversion |
What's Next?¶
-
Getting Started
Follow our step-by-step tutorial to build your first application
-
API Reference
Complete documentation for all classes and methods
-
Examples
Real-world code examples and patterns
-
Best Practices
Production-ready patterns and optimizations
License¶
rsylla is dual-licensed under MIT or Apache-2.0, matching the scylla-rust-driver license.