Snowplow Python tracker version 0.10.0 released

We are pleased to announce the release of Snowplow Python Tracker version 0.10.0.

This release brings two enhancements:

  • Adds support for Python version 3.10 (#254)
  • Adds configurable timeouts for HTTP requests (#258)

In order to add support for Python 3.10, the use of the pycontracts library was removed. In its place, we added Python 3 type hints to enable static type checking and implemented custom contract validations for runtime checking of value ranges. However, as a consequence of adding type hints, we had to drop support for Python 2.

Configurable timeouts for HTTP requests enable setting GET and POST HTTP request timeouts in the Emitter. By configuring timeouts, one can configure emitter behavior in case of unresponsive collectors or hanging requests. Connect and read timeouts can be configured together or separately. This is a community contribution, thanks to @DDeyanov!

Breaking changes

This version removes the use of pycontracts library to check for contract validations in function arguments. This results in some changes in behavior:

  1. Instead of the contracts.interface.ContractNotRespected error, a standard ValueError is raised when constraints on argument value ranges are violated.
  2. While value ranges are still validated at runtime, argument types are no longer checked at runtime. Instead, we introduced type hints to support static type checking. Our recommendation is to use IDEs that can surface type violations in your code.

Support for Python 2 was dropped with this release. In order to use the tracker with Python 2 codebase, please remain on tracker versions 0.9.x.


To upgrade using pip:

pip install snowplow-tracker==0.10.0

See the setup section in the documentation for more information.

On GitHub: GitHub - snowplow/snowplow-python-tracker: Snowplow event tracker for Python. Add analytics to your Python and Django apps, webapps and games
On PyPI: snowplow-tracker ยท PyPI