amplitude-analytics
The official Amplitude backend Python SDK for server-side instrumentation.
Description
<p align="center"> <a href="https://amplitude.com" target="_blank" align="center"> <img src="https://static.amplitude.com/lightning/46c85bfd91905de8047f1ee65c7c93d6fa9ee6ea/static/media/amplitude-logo-with-text.4fb9e463.svg" width="280"> </a> <br /> </p> # Amplitude Python SDK [](https://badge.fury.io/py/amplitude-analytics) The official Amplitude backend Python SDK for server-side instrumentation. ## Development ### Run Server Locally Refer to `examples/README.md`. ### Run Unit Tests Locally #### Run Directly ``` python3 -m unittest discover -s ./src -p 'test_*.py' ``` #### Run with `tox` ``` pip3 install --user tox python3 -m tox -e py ``` ## Amplitude and Ampli Wrapper [Ampli SDK](https://www.docs.developers.amplitude.com/data/ampli/) is autogenerated library based on your pre-defined [tracking plan](https://developers.data.amplitude.com/what-is-a-tracking-plan). The Ampli Wrapper, is a lightweight wrapper over the Amplitude SDK that provides type-safety, supports linting, and enables features like input validation. The code replicates the spec in the Tracking Plan and enforces its rules and requirements. This repository is about **Amplitude SDK**. To learn more about Ampli Wrapper, please refer to the [Ampli Python](https://www.docs.developers.amplitude.com/data/sdks/python/ampli/) and [examples](https://github.com/amplitude/ampli-examples). ## Installation and Quick Start Please visit the [Developer Center](https://docs.developers.amplitude.com/data/sdks/python/) for instructions on installing and using our the SDK. ## Changelog View the [releases here](https://github.com/amplitude/Amplitude-Python/releases). ## Need Help? If you have any issues using our SDK, feel free to [create a GitHub issue](https://github.com/amplitude/Amplitude-Python/issues/new) or submit a request on [Amplitude Help](https://help.amplitude.com/hc/en-us/requests/new).
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 1.2.3 | Imported from PyPI (1.2.3) | Low | 4/21/2026 |
| v1.2.3 | ## v1.2.3 (2026-03-31) ### Bug Fixes - Dummy patch to test Trusted Publishing ([#73](https://github.com/amplitude/Amplitude-Python/pull/73), [`16887df`](https://github.com/amplitude/Amplitude-Python/commit/16887df7ee9db506da1afc238922341dac153d0d)) ### Chores - Upgrade semantic release to v10 ([#72](https://github.com/amplitude/Amplitude-Python/pull/72), [`60c9ec3`](https://github.com/amplitude/Amplitude-Python/commit/60c9ec350c68dc523029c3d12740e0a9737795af)) --- **Detailed Changes**: [v1 | Medium | 3/31/2026 |
| v1.2.2 | ### Fix * Treat HttpStatus.UNKNOWN as retryable ([#70](https://github.com/amplitude/Amplitude-Python/issues/70)) ([`3e1db08`](https://github.com/amplitude/Amplitude-Python/commit/3e1db08f110c570a7d7c07692e121703e8d376e0)) | Low | 2/17/2026 |
| v1.2.1 | ### Fix * Respect flush_queue_size in Worker.flush() ([#64](https://github.com/amplitude/Amplitude-Python/issues/64)) ([`d9accf0`](https://github.com/amplitude/Amplitude-Python/commit/d9accf06bafa27446a641cc84a5d8a3f8a86c700)) | Low | 11/19/2025 |
| v1.2.0 | ### Feature * Add support for setting user agent on event ([#61](https://github.com/amplitude/Amplitude-Python/issues/61)) ([`bda8b95`](https://github.com/amplitude/Amplitude-Python/commit/bda8b95f50daf092f0fe570fab473e2255f6f5d5)) | Low | 7/1/2025 |
| v1.1.5 | ### Fix * Adding currency property to events ([#60](https://github.com/amplitude/Amplitude-Python/issues/60)) ([`6984e76`](https://github.com/amplitude/Amplitude-Python/commit/6984e769d486048f73c08f7003862c16876b3d99)) | Low | 2/26/2025 |
| v1.1.4 | ### Fix * Allow none property value but not send ([#54](https://github.com/amplitude/Amplitude-Python/issues/54)) ([`677ebe7`](https://github.com/amplitude/Amplitude-Python/commit/677ebe72efe86f231bd4c4bfc13f02794ff63b8b)) | Low | 12/12/2023 |
| v1.1.3 | ### Fix * Set group should set user property ([#51](https://github.com/amplitude/Amplitude-Python/issues/51)) ([`964a1b6`](https://github.com/amplitude/Amplitude-Python/commit/964a1b6693a98f4343e9b4c9f94f89a1b747335c)) | Low | 9/1/2023 |
| v1.1.2 | ### Fix * Mutable defaults in init ([#48](https://github.com/amplitude/Amplitude-Python/issues/48)) ([`958e394`](https://github.com/amplitude/Amplitude-Python/commit/958e394242e1b0bd9b988a782e611254e496d6e6)) | Low | 8/4/2023 |
| v1.1.1 | ### Fix * Fix script cleanup ([#43](https://github.com/amplitude/Amplitude-Python/issues/43)) ([`8c2f0b7`](https://github.com/amplitude/Amplitude-Python/commit/8c2f0b7c1b3f9bdf321b8ca0c1ac6ed5f62e5865)) * Fix issue https://github.com/amplitude/Amplitude-Python/issues/38 | Low | 1/11/2023 |
| v1.1.0 | ### Feature * Add ingestion_metadata field ([#36](https://github.com/amplitude/Amplitude-Python/issues/36)) ([`a74a943`](https://github.com/amplitude/Amplitude-Python/commit/a74a943caab46e51a63c2933ce680aa9a345e7d9)) * Add library context identifier ([#33](https://github.com/amplitude/Amplitude-Python/issues/33)) ([`d1c8f52`](https://github.com/amplitude/Amplitude-Python/commit/d1c8f52c595361d59cb9f0cfaa3cb13afb75ee30)) * Add version_name to EventOptions ([#31](https://github.com/amplitude/Ampli | Low | 9/8/2022 |
| v1.0.0 | ## Chore * release stable version 1.0.0 of Amplitude Python SDK. ## What's Changed * chore: Bump to 1.0.0 version by @bohan-amplitude in https://github.com/amplitude/Amplitude-Python/pull/30 **Full Changelog**: https://github.com/amplitude/Amplitude-Python/compare/v0.4.1...v1.0.0 | Low | 6/29/2022 |
| v0.4.1 | ### Fix * Get_event_body for enum value from ampli ([#29](https://github.com/amplitude/Amplitude-Python/issues/29)) ([`2bbc1b0`](https://github.com/amplitude/Amplitude-Python/commit/2bbc1b093d800641f846a02194fd3adb7d3bb31d)) * Set_group put group_type/group_name in groups attribute ([#28](https://github.com/amplitude/Amplitude-Python/issues/28)) ([`828040e`](https://github.com/amplitude/Amplitude-Python/commit/828040e08e2ecc7b3ff240cc25dd58fba573e12a)) * Add process logs & flush() returns future | Low | 6/23/2022 |
| v0.4.0 | ### Feature * Add plan to config ([#26](https://github.com/amplitude/Amplitude-Python/issues/26)) ([`eb3edf9`](https://github.com/amplitude/Amplitude-Python/commit/eb3edf969a29e372da054fb44d2ea8cc89b09d42)) | Low | 6/3/2022 |
| v0.3.0 | ### Feature * Flask and django simple example ([#22](https://github.com/amplitude/Amplitude-Python/issues/22)) ([`c71b8e0`](https://github.com/amplitude/Amplitude-Python/commit/c71b8e0de36eafaa3af673af8ef35e4485107137)) ### Fix * Set correct fetch-depth for semantic release ([#25](https://github.com/amplitude/Amplitude-Python/issues/25)) ([`0514d40`](https://github.com/amplitude/Amplitude-Python/commit/0514d40665a1d52bec999301eeca609c28a9e9d6)) * Broken release action ([#24](https://github.com/ | Low | 5/12/2022 |
| v0.2.2 | ### Fix * Use new thread instead of background blocking thread ([#20](https://github.com/amplitude/Amplitude-Python/issues/20)) ([`24f807f`](https://github.com/amplitude/Amplitude-Python/commit/24f807f3c9eb2806deb83c5545151ca034e3ce20)) | Low | 4/29/2022 |
| v0.2.1 | ### Fix * Handles exceptions raised by `request.urlopen` in `HttpClient.post` ([#17](https://github.com/amplitude/Amplitude-Python/issues/17)) ([`4150ea0`](https://github.com/amplitude/Amplitude-Python/commit/4150ea000bb9c67f630c99df4bdf40b8f6fde568)) | Low | 4/21/2022 |
| v0.2.0 | ### Feature * Unit test for client module ([#15](https://github.com/amplitude/Amplitude-Python/issues/15)) ([`0cdb0b4`](https://github.com/amplitude/Amplitude-Python/commit/0cdb0b46bcde7b974791d10f0d4ff42c842fe42b)) | Low | 4/16/2022 |
