Please see the Python integration docs for details.
We recommend using uv. It's super fast.
- Run
uv venv env
(creates virtual environment called "env")- or
python3 -m venv env
- or
- Run
source env/bin/activate
(activates the virtual environment) - Run
uv sync --extra dev --extra test
(installs the package in develop mode, along with test dependencies)- or
pip install -e ".[dev,test]"
- or
- you have to run
pre-commit install
to have auto linting pre commit - Run
make test
- To run a specific test do
pytest -k test_no_api_key
uv python install 3.9.19
uv python pin 3.9.19
uv venv env
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.
Updates are released using GitHub Actions: after bumping version.py
in master
and adding to CHANGELOG.md
, go to our release workflow's page and dispatch it manually, using workflow from master
.