๐ก STATION LOG โ ARGOS-7 // SCYLLA NEBULA
Deep in the
Scylla Nebula, Station
Argos-7 monitors environmental conditions
across all decks. Sensors transmit telemetry
continuously โ a background device
generates new readings every few seconds, stored in
time-bucketed partitions.
The
DESC clustering order ensures the crew always sees the newest readings first.
๐งโ๐ป COODIE PATTERNS IN THIS DEMO
# 1. Composite partition key โ time-bucketed by day
sensor_id: Annotated[str, PrimaryKey(partition_key_index=0)]
date_bucket: Annotated[date, PrimaryKey(partition_key_index=1)]
# 2. ClusteringKey DESC โ newest readings first
ts: Annotated[datetime, ClusteringKey(order="DESC")]
# 3. per_partition_limit() โ latest N readings per sensor
readings = await SensorReading.find(sensor_id=sid, date_bucket=today) \
.per_partition_limit(5).all()
# 4. paged_all() โ cursor-based pagination with infinite scroll
result = await SensorReading.find().fetch_size(15).paged_all()
# 5. Background device โ new readings every 3s (real-time)
# Dashboard auto-refreshes to show live data
๐ Infinite Scroll Reading Feed
Demonstrates paged_all() with cursor-based pagination.
Scroll down to automatically load more pages. Use the date picker to start from a specific date.
| Sensor |
Timestamp |
Bucket |
Temp (ยฐC) |
Humidity (%) |
Pressure (hPa) |
Battery |
{% endblock %}