#client #posthog #com #post-hog

posthog-rs

An unofficial Rust client for Posthog (https://posthog.com/)

13 releases

new 0.3.5 Feb 19, 2025
0.3.4 Feb 19, 2025
0.2.2 Oct 26, 2021
0.1.3 Apr 29, 2021

#22 in #com

Download history 36/week @ 2024-10-29 41/week @ 2024-11-12 14/week @ 2024-11-19 4/week @ 2024-11-26 1/week @ 2024-12-03 22/week @ 2024-12-10 2/week @ 2024-12-31 54/week @ 2025-01-07 13/week @ 2025-01-14 33/week @ 2025-01-21 161/week @ 2025-01-28 22/week @ 2025-02-04 52/week @ 2025-02-11

270 downloads per month
Used in cata

MIT license

16KB
337 lines

PostHog Rust

Please see the main PostHog docs.

This crate is under development

Quickstart

Add posthog-rs to your Cargo.toml.

[dependencies]
posthog_rs = "0.2.0"
let client = crate::client(env!("POSTHOG_API_KEY"));

let mut event = Event::new("test", "1234");
event.insert_prop("key1", "value1").unwrap();
event.insert_prop("key2", vec!["a", "b"]).unwrap();

client.capture(event).unwrap();

Dependencies

~6–18MB
~251K SLoC