pip install applicationinsights from applicationinsights import TelemetryClient tc = TelemetryClient('<YOUR INSTRUMENTATION KEY GOES HERE>') tc.track_event("Test event") tc.flush()