tessl install tessl/pypi-posthog@6.7.0Integrate PostHog into any python application.
Agent Success
Agent success rate when using this tile
89%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.03x
Baseline
Agent success rate without this tile
86%
{
"context": "This criteria evaluates how well the engineer uses PostHog's synchronous mode capabilities to handle event tracking in serverless/short-lived execution environments. The focus is specifically on proper client configuration for synchronous operation and lifecycle management.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Client initialization",
"description": "Initializes a PostHog client using posthog.Client() or similar initialization method. The client should be initialized at module level or in a way that persists across invocations (not recreated on each handler call).",
"max_score": 15
},
{
"name": "Synchronous mode enabled",
"description": "Configures the PostHog client with sync_mode=True to ensure events are sent immediately in the calling thread rather than queued for background processing.",
"max_score": 35
},
{
"name": "Event capture",
"description": "Uses posthog.capture() or client.capture() to track events with the user_id (as distinct_id), action (as event name), and metadata (as properties).",
"max_score": 20
},
{
"name": "Proper cleanup",
"description": "Calls posthog.shutdown() or client.shutdown() after capturing events to flush any queued events and properly close connections before the function returns.",
"max_score": 25
},
{
"name": "API key configuration",
"description": "Provides the project_api_key parameter when initializing the client (even if using a placeholder or environment variable).",
"max_score": 5
}
]
}