#post-hog #posthog-rs

posthog-rs

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

13 releases

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

#219 in Web programming

Download history 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 56/week @ 2025-02-11 1366/week @ 2025-02-18 1359/week @ 2025-02-25 1192/week @ 2025-03-04 1356/week @ 2025-03-11 1000/week @ 2025-03-18 930/week @ 2025-03-25 2293/week @ 2025-04-01

5,777 downloads per month
Used in 3 crates (2 directly)

MIT license

16KB
328 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
~252K SLoC