Scarf's Python SDK is a client library for sending telemetry events to Scarf, typically using JSON payloads. It provides open-source software maintainers with deep insights into how their projects are being used, by which companies, and more, aiding in understanding reach and identifying growth opportunities. The library is actively maintained with consistent minor updates.
pip install scarf-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `ScarfEventLogger` with a Scarf endpoint URL and send a custom telemetry event with a JSON payload. It also highlights how users can opt-out using environment variables.
Always ensure the `endpoint_url` passed to `ScarfEventLogger` is correct and resolves to your Scarf Gateway or event collection endpoint.
Inform your users about the `DO_NOT_TRACK` and `SCARF_NO_ANALYTICS` environment variables for privacy control. Handle scenarios where telemetry might be disabled gracefully in your application logic.
Consider increasing the `timeout` parameter during `ScarfEventLogger` initialization (e.g., `timeout=10.0`) or when calling `logger.log_event` for specific events.
Ensure the library is installed with `pip install scarf-sdk` and import it using `from scarf import ScarfEventLogger`.
Double-check that the `endpoint_url` is correct and reachable. Verify that `DO_NOT_TRACK` or `SCARF_NO_ANALYTICS` environment variables are not set to `1` in the execution environment. Also ensure an Event Collection Package is configured in your Scarf account.
Increase the `timeout` parameter when initializing `ScarfEventLogger` or when calling `log_event`. For example: `logger = ScarfEventLogger(endpoint_url="...", timeout=10.0)`.
No dependency data recorded yet.