LogSnag API Wrapper
Project description
Installation
pip3 install logsnag
Usage
Import Library
from logsnag import LogSnag
Initialize Client
logsnag = LogSnag(token='7f568d735724351757637b1dbf108e5', project="my-saas")
Publish Event
logsnag.track(
channel="waitlist",
event="User Joined",
user_id="user_123",
description="Email: john@doe.com",
icon="🎉",
tags={
"source": "google",
},
notify=True
)
User Properties
logsnag.identify(
user_id="user_123",
properties={
"name": "John Doe",
"email": "john@doe.com",
"plan": "free",
}
)
Group Properties
logsnag.group(
user_id="user_123",
group_id="group_123",
properties={
"name": "ACME Inc.",
"plan": "enterprise",
"fund": "Series A",
}
)
### Publish Insight
```python
logsnag.insight.track(
title='User Count',
value=100,
icon='👨',
)
Increment Insight
logsnag.insight.increment(
title='User Count',
value=1,
icon='👨',
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
logsnag-1.0.0.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logsnag-1.0.0.tar.gz.
File metadata
- Download URL: logsnag-1.0.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1251336e7f5dc3f065871a0ac2b8b8e2cbc25bfa679b3bfd3f8a4674997d1162
|
|
| MD5 |
e2a5ef7dac575f2c4db75e44f4e208db
|
|
| BLAKE2b-256 |
e5b8400d8f9324bff335cb441c7142f52455a88d8012e0d133c293364c667404
|
File details
Details for the file logsnag-1.0.0-py3-none-any.whl.
File metadata
- Download URL: logsnag-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9669e44c1820a5eaf211720f2651e4c7a8afe24924302cedfadfbbd7c99b67b8
|
|
| MD5 |
3bdf4e20df47bb2d932d1097e9863fa5
|
|
| BLAKE2b-256 |
435b1d7ace9c4284a6612bab9cdaff848190d2fafdc578c31429330c8660fd25
|