--- id: launchdarkly-eventsource version: "1.7.2" license: Apache-2.0 license_treatment: permissive maintenance: active --- # launchdarkly-eventsource — LaunchDarkly SSE Client License: permissive · Maintenance: active · Downloads: 12.0M/mo ## What it is and what it does LaunchDarkly-eventsource is a Python library for consuming Server-Sent Events (SSE) from remote HTTP endpoints. It provides both a synchronous implementation (SSEClient) that blocks the caller's thread and an experimental async variant (AsyncSSEClient) for asyncio-based applications. The library implements the SSE specification with extensions like exponential backoff retry logic, configurable read timeouts, custom headers, and the ability to retry on HTTP error statuses—behaviors beyond the standard EventSource specification. The package is designed primarily to support the LaunchDarkly SDK for Python but works independently for any SSE consumption use case. It uses urllib3 by default for HTTP requests but can be configured to read from arbitrary input streams. The async implementation is explicitly marked experimental and not recommended for production; the synchronous implementation is the stable, recommended path for most users. Use it for: - Consume feature flag updates from LaunchDarkly's streaming API in a Python backend service. - Build a real-time event listener that processes server-sent events with automatic reconnection and backoff. - Integrate SSE streams into asyncio applications using the experimental AsyncSSEClient for non-blocking event consumption. - Stream configuration or notification updates from a remote HTTP endpoint with custom retry and timeout policies. - Monitor and react to server events in a long-running daemon process with resilient connection handling. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Consumes Server-Sent Events (SSE) from remote APIs with synchronous and experimental async implementations, supporting exponential backoff retries and custom HTTP configuration. Yes. The package is actively maintained, has low install friction, carries a permissive license, and solves a clear problem—consuming SSE streams with production-grade retry logic. Use the synchronous SSEClient for stable, reliable event streaming. Avoid the async variant in production unless you have tested it thoroughly in your specific use case, as it is explicitly experimental. ## Install pip install launchdarkly-eventsource uv add launchdarkly-eventsource poetry add launchdarkly-eventsource ## Installing launchdarkly-eventsource Before you install: Low friction installation with a single runtime dependency (urllib3). Actively maintained with a recent release; supports current Python versions (3.10 and higher). Async features are experimental and not production-ready. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install launchdarkly-eventsource from launchdarkly_eventsource import SSEClient client = SSEClient('https://example.com/events') for event in client: print(event.data) Requires Python 3.10 or higher. Async variant requires optional aiohttp dependency installed via pip install launchdarkly-eventsource[async]. Verify before relying: - Whether the synchronous SSEClient is production-ready or carries similar stability caveats as the async variant. - Performance characteristics and throughput limits under sustained event streams. - Whether custom stream implementations beyond urllib3 are documented and supported. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 12.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags server-sent events client, SSE streaming events, HTTP event streaming, event source python, real-time event consumption, async event streaming, reconnect with backoff, streaming, event-driven, http-client [View on SkillFed](https://skillfed.io/packages/launchdarkly-eventsource) · [View on PyPI](https://pypi.org/project/launchdarkly-eventsource/)