Skip to content

v1.0.0

Latest

Choose a tag to compare

@mikeckennedy mikeckennedy released this 11 Jun 17:47

[1.0.0]

First stable release. The package is now marked Development Status :: 5 - Production/Stable (it has
been used in production at Talk Python Training for some time) and follows SemVer
from here forward.

Changed

  • Promoted the trove classifier from 4 - Beta to 5 - Production/Stable, and added the
    Typing :: Typed classifier to advertise the bundled py.typed marker.
  • Expanded the PyPI keyword set (added web-analytics, privacy, tracking, metrics, events, page-views,
    telemetry, statistics, self-hosted, async, httpx, pydantic, sdk, api-client) for better discoverability.

Added

  • pydantic.Field(description=...) metadata on every response-model field, plus a griffe-pydantic
    dev dependency, enriching the response models for IDEs, JSON schema, and future API-reference
    rendering. Note: the current Great Docs version (0.13.0) does not load griffe extensions, so the
    rendered field docs still come from the docstring Attributes: sections; the Field descriptions
    will surface on the docs site once the generator loads the extension.

Changed

  • Synchronous send functions now return the Umami API's JSON response as a dict (and {} when
    tracking is disabled), matching their async twins. Previously new_event(), new_revenue_event(),
    and new_page_view() returned None; new_page_view_async() also now returns the response dict
    instead of None.
  • Missing or blank required event fields (hostname, website_id, event_name) now raise
    umami.errors.ValidationError instead of a bare Exception, so they can be caught alongside the
    SDK's other validation errors.
  • Website.shareId, Website.resetAt, and Website.deletedAt are now optional (default None), so
    a websites response that omits those keys no longer raises pydantic.ValidationError.
  • README now points to the new documentation site at https://mkennedy.codes/docs/umami-python/
    (added status badges, a documentation pointer near the top, and a "Documentation" section linking
    the full API reference). Docs-only change — no code or packaging changes.
  • Docstrings across the public API were expanded and corrected for the generated documentation
    site (Great Docs renders them verbatim, and they feed llms.txt). Added Raises: sections to
    every raising function; fixed website_stats() / website_stats_async() to document their real
    return type (models.WebsiteStats, not the nonexistent WebsiteStatsResponse); removed
    unprofessional/inaccurate prose from verify_token (the "minutes, hours, or years" hedge) and
    new_event (the "not sure how this is different" aside); corrected new_page_view wording
    (visitor; the ua user-agent string); clarified that disable() still validates before skipping
    the HTTP request and that both affect only the send functions; documented all response models and
    exception classes; added a package module docstring; and added runnable usage examples.
    Docstring-only — no code or behavior changes.

Fixed

  • validate_event_data no longer lets a whitespace-only event_name through (the check used and,
    so whitespace bypassed it; it now uses or).