We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 319b380 commit 994003fCopy full SHA for 994003f
example.py
@@ -1,10 +1,15 @@
1
# PostHog Python library example
2
-
3
-# Import the library
4
-# import time
+import argparse
5
6
import posthog
7
+# Add argument parsing
+parser = argparse.ArgumentParser(description="PostHog Python library example")
8
+parser.add_argument(
9
+ "--flag", default="person-on-events-enabled", help="Feature flag key to check (default: person-on-events-enabled)"
10
+)
11
+args = parser.parse_args()
12
+
13
posthog.debug = True
14
15
# You can find this key on the /setup page in PostHog
@@ -18,7 +23,7 @@
18
23
19
24
print(
20
25
posthog.feature_enabled(
21
- "person-on-events-enabled",
26
+ args.flag, # Use the flag from command line arguments
22
27
"12345",
28
groups={"organization": str("0182ee91-8ef7-0000-4cb9-fedc5f00926a")},
29
group_properties={
0 commit comments