posthog 6.7.8


pip install posthog

  Latest version

Released: Oct 16, 2025


Meta
Author: Posthog
Maintainer: PostHog
Requires Python: >=3.9

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

Operating System
  • OS Independent

License
  • OSI Approved :: MIT License

Programming Language
  • Python
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

PostHog Python

posthoglogo

pypi installs GitHub contributors GitHub commit activity GitHub closed issues

Please see the Python integration docs for details.

Development

Testing Locally

We recommend using uv. It's super fast.

  1. Run uv venv env (creates virtual environment called "env")
    • or python3 -m venv env
  2. Run source env/bin/activate (activates the virtual environment)
  3. Run uv sync --extra dev --extra test (installs the package in develop mode, along with test dependencies)
    • or pip install -e ".[dev,test]"
  4. you have to run pre-commit install to have auto linting pre commit
  5. Run make test
  6. To run a specific test do pytest -k test_no_api_key

PostHog recommends uv so...

uv python install 3.9.19
uv python pin 3.9.19
uv venv
source env/bin/activate
uv sync --extra dev --extra test
pre-commit install
make test

Running Locally

Assuming you have a local version of PostHog running, you can run python3 example.py to see the library in action.

Releasing Versions

Updates are released automatically using GitHub Actions when version.py is updated on master. After bumping version.py in master and adding to CHANGELOG.md, the release workflow will automatically trigger and deploy the new version.

If you need to check the latest runs or manually trigger a release, you can go to our release workflow's page and dispatch it manually, using workflow from master.

Testing changes locally with the PostHog app

You can run make prep_local, and it'll create a new folder alongside the SDK repo one called posthog-python-local, which you can then import into the posthog project by changing pyproject.toml to look like this:

dependencies = [
    ...
    "posthoganalytics" #NOTE: no version number
    ...
]
...
[tools.uv.sources]
posthoganalytics = { path = "../posthog-python-local" }

This'll let you build and test SDK changes fully locally, incorporating them into your local posthog app stack. It mainly takes care of the posthog -> posthoganalytics module renaming. You'll need to re-run make prep_local each time you make a change, and re-run uv sync --active in the posthog app project.

6.7.8 Oct 16, 2025
6.7.7 Oct 14, 2025
6.7.6 Sep 22, 2025
6.7.5 Sep 16, 2025
6.7.4 Sep 05, 2025
6.7.3 Sep 04, 2025
6.7.2 Sep 03, 2025
6.7.1 Sep 01, 2025
6.7.0 Aug 26, 2025
6.6.1 Aug 21, 2025
6.6.0 Aug 18, 2025
6.5.0 Aug 08, 2025
6.4.1 Aug 06, 2025
6.4.0 Aug 05, 2025
6.3.4 Aug 05, 2025
6.3.3 Aug 02, 2025
6.3.2 Jul 31, 2025
6.3.1 Jul 23, 2025
6.3.0 Jul 22, 2025
6.2.1 Jul 22, 2025
6.1.1 Jul 16, 2025
6.1.0 Jul 10, 2025
6.0.4 Jul 09, 2025
6.0.3 Jul 07, 2025
6.0.2 Jul 02, 2025
6.0.1 Jul 01, 2025
6.0.0 Jun 27, 2025
5.4.0 Jun 20, 2025
5.3.0 Jun 19, 2025
5.2.0 Jun 19, 2025
5.1.0 Jun 18, 2025
5.0.0 Jun 16, 2025
4.10.0 Jun 13, 2025
4.9.0 Jun 13, 2025
4.8.0 Jun 12, 2025
4.7.0 Jun 11, 2025
4.6.2 Jun 10, 2025
4.6.1 Jun 09, 2025
4.6.0 Jun 09, 2025
4.5.0 Jun 09, 2025
4.4.2 Jun 09, 2025
4.4.1 Jun 09, 2025
4.4.0 Jun 06, 2025
4.3.2 Jun 06, 2025
4.2.0 May 23, 2025
4.1.0 May 23, 2025
4.0.1 Apr 29, 2025
4.0.0 Apr 24, 2025
3.25.0 Apr 15, 2025
3.24.3 Apr 15, 2025
3.24.2 Apr 15, 2025
3.24.1 Apr 11, 2025
3.24.0 Apr 10, 2025
3.23.0 Mar 26, 2025
3.22.0 Mar 26, 2025
3.21.0 Mar 17, 2025
3.20.0 Mar 14, 2025
3.19.1 Mar 10, 2025
3.19.0 Mar 06, 2025
3.18.1 Mar 03, 2025
3.18.0 Feb 28, 2025
3.17.0 Feb 27, 2025
3.16.0 Feb 26, 2025
3.15.1 Feb 23, 2025
3.15.0 Feb 21, 2025
3.14.2 Feb 20, 2025
3.14.1 Feb 18, 2025
3.13.0 Feb 12, 2025
3.12.1 Feb 11, 2025
3.12.0 Feb 11, 2025
3.11.0 Jan 28, 2025
3.10.0 Jan 24, 2025
3.9.3 Jan 23, 2025
3.9.2 Jan 22, 2025
3.9.1 Jan 22, 2025
3.9.0 Jan 21, 2025
3.8.4 Jan 20, 2025
3.8.3 Jan 14, 2025
3.8.2 Jan 14, 2025
3.8.1 Jan 14, 2025
3.8.0 Jan 14, 2025
3.7.5 Jan 03, 2025
3.7.4 Nov 27, 2024
3.7.3 Nov 25, 2024
3.7.2 Nov 19, 2024
3.7.0 Oct 03, 2024
3.6.6 Sep 16, 2024
3.6.5 Sep 10, 2024
3.6.4 Sep 09, 2024
3.6.3 Sep 03, 2024
3.6.2 Sep 03, 2024
3.6.1 Sep 03, 2024
3.6.0 Aug 28, 2024
3.5.2 Aug 21, 2024
3.5.0 Mar 04, 2024
3.4.2 Feb 20, 2024
3.4.1 Feb 13, 2024
3.4.0 Feb 05, 2024
3.3.4 Jan 30, 2024
3.3.3 Jan 26, 2024
3.3.2 Jan 19, 2024
3.3.1 Jan 10, 2024
3.3.0 Jan 09, 2024
3.2.0 Jan 09, 2024
3.1.0 Dec 04, 2023
3.0.2 Aug 17, 2023
3.0.1 Apr 21, 2023
3.0.0 Apr 17, 2023
2.5.0 Apr 10, 2023
2.4.2 Mar 30, 2023
2.4.0 Mar 16, 2023
2.3.1 Feb 07, 2023
2.3.0 Jan 31, 2023
2.2.0 Nov 14, 2022
2.1.2 Sep 15, 2022
2.1.1 Sep 14, 2022
2.1.0 Aug 12, 2022
2.0.1 Aug 04, 2022
2.0.0 Aug 02, 2022
1.4.9 Jun 13, 2022
1.4.8 May 12, 2022
1.4.7 Apr 25, 2022
1.4.6 Mar 30, 2022
1.4.5 Jan 05, 2022
1.4.4 Nov 25, 2021
1.4.3 Oct 28, 2021
1.4.2 Jun 22, 2021
1.4.1 May 28, 2021
1.4.0 May 18, 2021
1.3.1 May 07, 2021
1.2.1 Feb 05, 2021
1.2.0 Jan 11, 2021
1.1.3 Nov 23, 2020
1.1.1 Sep 29, 2020
1.0.11 Apr 30, 2020
1.0.10 Apr 01, 2020
1.0.9 Feb 22, 2020
1.0.8 Feb 18, 2020
1.0.7 Feb 18, 2020
1.0.6 Feb 10, 2020
1.0.0 Feb 10, 2020

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
requests (<3.0,>=2.7)
six (>=1.5)
python-dateutil (>=2.2)
backoff (>=1.10.0)
distro (>=1.5.0)
typing-extensions (>=4.2.0)