skillfed

analytics-python

The hassle-free way to integrate analytics into any python application.

analytics-python v1.4.post1 1.8M downloads/30d#3,591 on PyPI254
Permissive license MIT License Active released

What it is and what it does

analytics-python is the official Python client for Segment's analytics platform. It wraps the Segment REST API to let you send user events and properties from your Python application to Segment, which then routes that data to your choice of downstream analytics services—Mixpanel, Google Analytics, Amplitude, or dozens of others—without requiring you to integrate each service separately.

The library handles the HTTP communication through requests, manages retries via backoff, and provides a straightforward API for tracking events, identifying users, and recording page views. It depends on six runtime packages including python-dateutil for timestamp handling and monotonic for consistent timing. The package is permissively licensed under MIT and has low installation friction.

Use it for:

  • Track user interactions (clicks, form submissions, purchases) in a web or mobile backend and send them to Segment for aggregation across analytics platforms
  • Identify and profile users with custom properties, then sync that data to CRM or marketing automation tools via Segment's integrations
  • Collect server-side events from a Python application and route them to multiple analytics destinations without maintaining separate client libraries
  • Log application events for real-time dashboarding and historical analysis across tools like Mixpanel, Amplitude, or custom data warehouses

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python client library that sends analytics events to the Segment API, allowing you to track user actions and integrate with multiple downstream analytics services through a single interface.

Yes, if you use Segment for analytics aggregation. The package is stable, permissively licensed, and has low install friction. However, note that the description itself directs users to the newer listing at segment-analytics-python due to a naming conflict, so verify whether you should use that package instead before installing this one.

Install

analytics-python on PyPI

pip

pip install analytics-python

uv

uv add analytics-python

poetry

poetry add analytics-python

Installing analytics-python

Before you install

Low install friction with five straightforward runtime dependencies. The package is actively maintained with recent commits and has been stable since its initial 2013 release, though the latest release was in March 2023.

License in practice

MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install analytics-python

import analytics
analytics.write_key = 'YOUR_WRITE_KEY'
analytics.track('user_id', 'event_name', {'property': 'value'})

Verify before relying

  • Whether the package continues to receive updates beyond March 2023 despite active repo status
  • Compatibility with Python versions beyond 3.8 given classifier list ends there

Package facts

License MIT License (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 5 — requests, six, monotonic, backoff, python-dateutil
Maintenance actively maintained — 1,241 days since the last release
Last repo commit
First released
Downloads 1,753,077/month — #3,591 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: analytics_python-1.4.post1-py2.py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

segment analytics python clientevent tracking api wrapperanalytics event collectionsegment integration pythonuser action trackinganalytics service aggregator
analyticsevent-trackingsegment-integration

More Internet packages

botocore

Botocore provides low-level, data-driven access…

permissive · top 100 on PyPI

aiobotocore

Provides an async client for AWS services using…

permissive · top 100 on PyPI

pydantic

Pydantic validates Python data structures…

permissive · top 100 on PyPI

filelock

Provides a platform-independent file locking…

permissive · top 100 on PyPI

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

googleapis-common-protos

Provides common Protocol Buffer message…

permissive · top 100 on PyPI

segment-analytics-python

A Python client for sending analytics events to…

permissive · top 5,000 on PyPI

universal-analytics-python3

Sends event and pageview data to Google…

permissive · top 15,000 on PyPI

launchpadlib

launchpadlib provides a Python client library…

copyleft · top 15,000 on PyPI

posthoganalytics

Sends event data and user properties to PostHog…

permissive · top 5,000 on PyPI

amplitude-analytics

Official Amplitude backend SDK for Python that…

permissive · top 5,000 on PyPI

kanaries-track

Sends event and metric data to Kanaries' data…

permissive · top 15,000 on PyPI

apache-airflow-providers-segment

Integrates Apache Airflow with Segment for…

permissive · top 15,000 on PyPI

posthog

PostHog Python SDK integrates product analytics…

permissive · top 1,000 on PyPI

snowplow-tracker

Sends event data from Python applications to…

permissive · top 1,000 on PyPI

mixpanel-py-async

Provides asynchronous event batching and…

permissive · top 15,000 on PyPI