{"id":5657,"library":"minimal-snowplow-tracker","title":"Minimal Snowplow Tracker","description":"minimal-snowplow-tracker is a Python library that provides a minimal event tracker for Snowplow analytics. It is a fork of the original `snowplow-python-tracker` (v0.8.0), stripped down to include only basic emitters and support for structured and unstructured event tracking. Last released in 2018 as version 0.0.2, it is primarily maintained as an internal dependency for projects like dbt-core for anonymous usage tracking, rather than an actively developed standalone library.","status":"maintenance","version":"0.0.2","language":"en","source_language":"en","source_url":"https://github.com/snowplow/snowplow-python-tracker","tags":["analytics","snowplow","event tracking","minimal","fork","dbt"],"install":[{"cmd":"pip install minimal-snowplow-tracker","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"HTTP requests for sending events","package":"requests","optional":false},{"reason":"AMQP emitter (removed in this minimal fork, but might be a vestigial dependency if not fully cleaned)","package":"pika","optional":true},{"reason":"Kafka emitter (removed in this minimal fork, but might be a vestigial dependency if not fully cleaned)","package":"kafka-python","optional":true}],"imports":[{"note":"Despite being installed as `minimal-snowplow-tracker`, the package uses the `snowplow_tracker` namespace internally, which can cause import conflicts if the official `snowplow-tracker` library is also installed.","wrong":"from minimal_snowplow_tracker import Tracker","symbol":"Tracker","correct":"from snowplow_tracker import Tracker"},{"note":"This minimal fork only retains the basic Emitter. Other emitters (e.g., Kafka, AMQP) from the original tracker are removed.","symbol":"Emitter","correct":"from snowplow_tracker import Emitter"}],"quickstart":{"code":"import os\nfrom snowplow_tracker import Tracker, Emitter\nfrom snowplow_tracker.self_describing_json import SelfDescribingJson\n\n# Replace with your Snowplow Collector endpoint\nCOLLECTOR_URL = os.environ.get('SNOWPLOW_COLLECTOR_URL', 'http://localhost:9090')\n\n# Initialize an emitter to send events to the collector\nemitter = Emitter(COLLECTOR_URL)\n\n# Initialize the tracker with a namespace and application ID\ntracker = Tracker(emitters=[emitter], namespace='my_app_namespace', app_id='my-python-app')\n\n# Track a structured event\ntracker.track_struct_event(\n    category='example_category',\n    action='example_action',\n    label='example_label',\n    property='example_property',\n    value=1.0\n)\n\n# Track an unstructured event with a self-describing JSON schema\nexample_schema = 'iglu:com.example_company/example_event/jsonschema/1-0-0'\nexample_data = {\n    'event_detail': 'This is an unstructured event',\n    'session_id': 'abc-123'\n}\nunstructured_event = SelfDescribingJson(example_schema, example_data)\ntracker.track_unstruct_event(unstructured_event)\n\nprint(f\"Events sent to {COLLECTOR_URL} using minimal-snowplow-tracker.\")\n# In a real application, you might want to gracefully close the emitter or ensure all events are sent.\n# For simple scripts, events are often sent synchronously or on program exit.","lang":"python","description":"This quickstart demonstrates how to initialize the tracker and send a structured event and an unstructured event. It uses the `snowplow_tracker` import path, which is the internal module name for `minimal-snowplow-tracker`. You will need a running Snowplow Collector (e.g., Snowplow Mini) at `COLLECTOR_URL` to receive events."},"warnings":[{"fix":"For comprehensive and up-to-date Snowplow tracking features, use the actively maintained `snowplow-tracker` library (pypi.org/project/snowplow-tracker/). If `minimal-snowplow-tracker` is a dependency, consider whether the older, limited functionality is sufficient or if an alternative tracking approach is needed.","message":"This library (version 0.0.2) is a highly minimal fork of the original `snowplow-python-tracker` (v0.8.0). It has removed all emitters except the basic one and all tracking event methods except for structured and unstructured events. Functionality available in newer versions of the official `snowplow-tracker` will not be present.","severity":"breaking","affected_versions":"0.0.2"},{"fix":"Avoid installing `minimal-snowplow-tracker` alongside the official `snowplow-tracker` in the same Python environment. If `minimal-snowplow-tracker` is a transitive dependency (e.g., via `dbt-core`), be aware of this potential conflict and manage your environment carefully, perhaps using virtual environments.","message":"The `minimal-snowplow-tracker` package, when installed, exposes its functionality under the `snowplow_tracker` Python module namespace. This creates a direct import conflict if the official, actively maintained `snowplow-tracker` library is also installed in the same environment, as both will try to provide modules under the same `snowplow_tracker` path.","severity":"gotcha","affected_versions":"0.0.2"},{"fix":"Migrate to the official and actively maintained `snowplow-tracker` library for Python. If adherence to Python 3.7 or earlier is required, ensure rigorous testing for compatibility.","message":"`minimal-snowplow-tracker` was last updated in October 2018 and officially supports Python up to 3.7. It is not actively maintained as a public library and is significantly behind the upstream `snowplow-python-tracker`. Using it with newer Python versions might lead to compatibility issues.","severity":"deprecated","affected_versions":"0.0.2"},{"fix":"If you intend to use a Snowplow Python tracker, consult the official documentation and GitHub for the actively maintained `snowplow-tracker` library to ensure correct implementation and access to supported features.","message":"The PyPI page for `minimal-snowplow-tracker` points to the `snowplow/snowplow-python-tracker` GitHub repository for its 'Contributing quickstart', which describes a testing setup and not a typical application usage. This reinforces that `minimal-snowplow-tracker` is not designed for direct end-user application integration, and its documentation is not for its specific minimal feature set.","severity":"gotcha","affected_versions":"0.0.2"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}