#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

#233 in Web programming

Download history 23/week @ 2024-12-09 48/week @ 2025-01-06 19/week @ 2025-01-13 31/week @ 2025-01-20 153/week @ 2025-01-27 33/week @ 2025-02-03 49/week @ 2025-02-10 1180/week @ 2025-02-17 1340/week @ 2025-02-24 1211/week @ 2025-03-03 1356/week @ 2025-03-10 1073/week @ 2025-03-17 937/week @ 2025-03-24

4,633 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–19MB
~252K SLoC