Skip to main content

LogSnag API Wrapper

Project description

LogSnag

LogSnag

Get notifications and track your project events.

Discord Documentation

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

logsnag.insight.track(
    title='User Count',
    value=100,
    icon='👨',
)

Increment Insight

logsnag.insight.increment(
    title='User Count',
    value=1,
    icon='👨',
)

Project details


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.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logsnag-1.0.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file logsnag-1.0.1.tar.gz.

File metadata

  • Download URL: logsnag-1.0.1.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

Hashes for logsnag-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ca0d56a3db46e0abb65d51e338365e55c28f66737f5707591003669d77056651
MD5 c1d78f8f9572b65a46c76ca1175acaa6
BLAKE2b-256 aca529af4c9ea9689a20a89331aa5ba8cdcc4beda5f9b1488e6f25c241c11b4b

See more details on using hashes here.

File details

Details for the file logsnag-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: logsnag-1.0.1-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

Hashes for logsnag-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b81a3435b246953b17fcdc7bff43156ebaf24dcaa97a56bd448e5e76e79d0b5d
MD5 cc56dff0d1ca7a553b7b6717ec2e2e94
BLAKE2b-256 5e4ebe5c6f30707dcd7480bc1b1c6610ef9031f7bc2b09d10f389937d7264a1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page