
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
posthog
Advanced tools
Please see the Python integration docs for details.
| SDK Version | Python Versions Supported | Notes |
|---|---|---|
| 7.3.1+ | 3.10, 3.11, 3.12, 3.13, 3.14 | Added Python 3.14 support |
| 7.0.0 - 7.0.1 | 3.10, 3.11, 3.12, 3.13 | Dropped Python 3.9 support |
| 4.0.1 - 6.x | 3.9, 3.10, 3.11, 3.12, 3.13 | Python 3.9+ required |
This repo requires all commits to be signed. To configure commit signing, see the PostHog handbook.
We recommend using uv. It's super fast.
uv venv env (creates virtual environment called "env")
python3 -m venv envsource env/bin/activate (activates the virtual environment)uv sync --extra dev --extra test (installs the package in develop mode, along with test dependencies)
pip install -e ".[dev,test]"pre-commit install to have auto linting pre commitmake testpytest -k test_no_api_keyuv so...uv python install 3.12
uv python pin 3.12
uv venv
source env/bin/activate
uv sync --extra dev --extra test
pre-commit install
make test
Assuming you have a local version of PostHog running, you can run python3 example.py to see the library in action.
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.
This repository uses Sampo for versioning, changelogs, and publishing to crates.io.
sampo addrelease label and merge to mainYou can also trigger a release manually via the workflow's workflow_dispatch trigger (still requires pending changesets).
FAQs
Integrate PostHog into any python application.
We found that posthog demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.