asyncio (PEP 3156) Redis support
Overall
score
98%
{
"context": "This criteria evaluates the engineer's proficiency in using aioredis for publish-subscribe messaging. It assesses proper usage of the PubSub API including creating pub/sub clients, subscribing to channels and patterns, publishing messages, receiving messages, and unsubscribing.",
"type": "weighted_checklist",
"checklist": [
{
"name": "PubSub client creation",
"description": "Creates and properly initializes aioredis PubSub client(s) or uses aioredis.Redis.pubsub() to obtain a PubSub instance for subscribing operations",
"max_score": 15
},
{
"name": "Redis client for publishing",
"description": "Creates aioredis.Redis client instance for publishing messages using the publish() method",
"max_score": 10
},
{
"name": "Channel subscription",
"description": "Uses PubSub.subscribe() method correctly to subscribe to specific channels",
"max_score": 15
},
{
"name": "Pattern subscription",
"description": "Uses PubSub.psubscribe() method correctly to subscribe to channel patterns with wildcard matching",
"max_score": 15
},
{
"name": "Message publishing",
"description": "Uses Redis.publish() method to send messages to channels and correctly handles the return value (number of subscribers)",
"max_score": 15
},
{
"name": "Message retrieval",
"description": "Uses PubSub.get_message() method with appropriate timeout parameter to receive messages from subscribed channels",
"max_score": 15
},
{
"name": "Unsubscribe functionality",
"description": "Uses PubSub.unsubscribe() method to unsubscribe from specific channels",
"max_score": 10
},
{
"name": "Async connection lifecycle",
"description": "Properly manages async connection lifecycle using await with connection creation and cleanup methods (close(), quit(), or context managers)",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-aioredisdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10