Skip to content

Commit ffecb3c

Browse files
committed
fix docstring for set
1 parent 6e00d57 commit ffecb3c

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

posthog/client.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -671,21 +671,7 @@ def set(self, **kwargs: Unpack[OptionalSetArgs]) -> Optional[str]:
671671
Examples:
672672
```python
673673
# Set with distinct id
674-
posthog.capture(
675-
'event_name',
676-
distinct_id='user-distinct-id',
677-
properties={
678-
'$set': {'name': 'Max Hedgehog'},
679-
'$set_once': {'initial_url': '/blog'}
680-
}
681-
)
682-
```
683-
```python
684-
# Set using context
685-
from posthog import new_context, identify_context
686-
with new_context():
687-
identify_context('user-distinct-id')
688-
posthog.capture('event_name')
674+
posthog.set(distinct_id='user123', properties={'name': 'Max Hedgehog'})
689675
```
690676
691677
Category:
@@ -1099,6 +1085,8 @@ def _load_feature_flags(self):
10991085
# Store old flags to detect changes
11001086
old_flags_by_key: dict[str, dict] = self.feature_flags_by_key or {}
11011087

1088+
print(self.personal_api_key, self.api_key, self.host)
1089+
11021090
response = get(
11031091
self.personal_api_key,
11041092
f"/api/feature_flag/local_evaluation/?token={self.api_key}&send_cohorts",

0 commit comments

Comments
 (0)