File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ """
3+ Simple test script for PostHog remote config endpoint.
4+ """
5+
6+ import posthog
7+
8+ # Initialize PostHog client
9+ #posthog.api_key = "phc_ml85lVi483SwbdDrqgb2LJOSXf050rPNpA6rrz7O5VY"
10+ posthog .api_key = "phc_8oSYhZJ7VpjQFNngdkUzEGctbY1u9P3SNJPcAKAhPvE"
11+ posthog .personal_api_key = "phs_QVofStqGt6UUMTlnxKoXb5cHAkQ7JesCZ1PUxfxNRUHKEUx"
12+ # posthog.personal_api_key = "phx_N8hy6HQcO0vplOc16fY2mYRBWVWl8mLDca38LgdmrwT3isA"
13+ posthog .host = "http://localhost:8000"
14+ posthog .debug = True
15+
16+ def test_remote_config ():
17+ """Test remote config payload retrieval."""
18+ print ("Testing remote config endpoint..." )
19+
20+ # Test feature flag key - replace with an actual flag key from your project
21+ flag_key = "unencrypted-remote-config-setting"
22+
23+ try :
24+ # Get remote config payload
25+ payload = posthog .get_remote_config_payload (flag_key )
26+ print (f"✅ Success! Remote config payload for '{ flag_key } ': { payload } " )
27+
28+ except Exception as e :
29+ print (f"❌ Error getting remote config: { e } " )
30+
31+ if __name__ == "__main__" :
32+ test_remote_config ()
You can’t perform that action at this time.
0 commit comments