Integrate PostHog into any python application.
89
Build a system that captures events with large payloads while ensuring batches stay within size limits.
Create a Python application that captures analytics events with configurable batch sizing:
The system should handle both small and large events efficiently, respecting batch size constraints.
@generates
def setup_analytics():
"""
Initialize and configure the analytics client with batch size settings.
Returns:
Configured analytics client
"""
pass
def capture_standard_events(client, count: int):
"""
Capture standard events with normal-sized properties.
Args:
client: Analytics client instance
count: Number of events to capture
"""
pass
def capture_large_events(client, count: int):
"""
Capture events with large property data (200KB+ per event).
Args:
client: Analytics client instance
count: Number of large events to capture
"""
pass
def finalize_delivery(client):
"""
Ensure all events are sent before shutdown.
Args:
client: Analytics client instance
"""
passProvides analytics event capture with configurable batching and size limits.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-posthogdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10