Skip to main content

Plausible.io Events API

Project description

plausible-events

This small library allows to easily use the Plausible Events API.

  • Privacy-focused. Uses the open-source and privacy-focused Plausible Analytics. IP addresses are only used to correctly count unique users and for approximate geolocation, but are never stored (also not by ipify, which is used to obtain the public IP address of the caller).
  • Doesn't slow down the main application. Calls to record events are non-blocking, the necessary http requests happen on a separate thread.
  • Doesn't show errors, but tries again. Failed event recordings are re-tried indefinitely, i.e. events aren't lost if network connectivity is temporarily interrupted.

Examples

from plausible_events import PlausibleEvents

# create object to record events for your plausible.io domain
pe = PlausibleEvents(domain='my.domain.com')

# record a page view event with a (hypothetical) path
pe.pageview('/login/user')

# record a custom event with additional custom properties
pe.event('my event', dict(os='mac', var='foo'))

What is Plausible Analytics?

Plausible Analytics is a transparent and fully open source analytics software. From their website:

Plausible is open source analytics. Our source code is available and accessible on GitHub so anyone can read it, inspect it and review it to verify that our actions match with our words. We welcome feedback and have a public roadmap. If you're happy to manage your own infrastructure, you can self-host Plausible too.

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

plausible-events-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

plausible_events-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file plausible-events-0.1.0.tar.gz.

File metadata

  • Download URL: plausible-events-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.6.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.6

File hashes

Hashes for plausible-events-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3587e407dde88bc0974c48f7cc274814145c10225238b4357e3b1010690539bd
MD5 5fadda2d675cb3958c88b00068f9a900
BLAKE2b-256 64786b143591b240a8baedd2f18434b88b68330970e92a2225a3747203de1dd9

See more details on using hashes here.

File details

Details for the file plausible_events-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: plausible_events-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.6.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.6

File hashes

Hashes for plausible_events-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a93f8a119e1f62c2ae148490e74f423f6f1d510819327fba8181108fe62f5507
MD5 acfdbc8af14fd21a07630a468367effe
BLAKE2b-256 0e3cc18d433357819238d945a32b1f778d80534db83611763721178a6b1abb93

See more details on using hashes here.

Supported by

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