Skip to main content

Amplitude API v2 logger for Python

Project description

amplitude-logger

GitHub-issues

Python client for Amplitude API v2 (https://developers.amplitude.com/docs/http-api-v2)

Installation

pip install amplitude-logger

Usage

Amplitude API

  1. Request your API key at https://developers.amplitude.com/

  2. Use that token to initialize client:

from amplitude import AmplitudeLogger
api_key = 'xxxxxxxxxxxxxxx'

amplitude_logger = AmplitudeLogger(api_key=api_key)

event_args = {
    "user_id": "USER_ID",
    "event_type": "Event Name",
    "event_properties": {"param": "value", "data": "value"},
}
event = amplitude_logger.create_event(**event_args)
amplitude_logger.log_event(event)

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

amplitude-logger-1.0.0.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

amplitude_logger-1.0.0-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

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