Skip to content

Add support for Metrics endpoint#14

Merged
skupriienko merged 12 commits into
mainfrom
DE-1564-Add-support-for-metrics-API
Jul 12, 2025
Merged

Add support for Metrics endpoint#14
skupriienko merged 12 commits into
mainfrom
DE-1564-Add-support-for-metrics-API

Conversation

@skupriienko
Copy link
Copy Markdown
Collaborator

@skupriienko skupriienko commented Jul 7, 2025

Links:

Actions:

  • Add the Metrics endpoint:

    • Add the analytics key to Config's __getitem__ and special cases
    • Add mailgun/handlers/metrics_handler.py with handle_metrics()
  • Examples:

    • Add mailgun/examples/metrics_examples.py with post_analytics_metrics() and post_analytics_usage_metrics()
  • Tests:

    • Add class MetricsTest to tests/tests.py
  • CI:

    • Update pre-commit hooks to the latest versions
    • Remove duplications
    • Add pydocstyle hook
    • Add types-requests to mypy's additional_dependencies
    • Clean up
  • Package Management:

    • Breaking changes: drop support for Python 3.9
      • set py310 as a minimum version in environment-dev.yaml, environment.yaml, pyproject.toml, .github/ISSUE_TEMPLATE/bug_report.yml, .github/workflows/commit_checks.yaml
      • Remove _version.py from tracking and add to .gitignore
      • Improve a conda recipe
      • Enable refurb in environment-dev.yaml
      • Use project.license and project.license-files in pyproject.toml and remove wheel build dependency because of relying on setuptools >=77.
  • Linting & Formatting:

    • Fix type hints in mailgun/handlers/domains_handler.py and mailgun/handlers/ip_pools_handler.py
  • Docs:

    • Add Get account metrics and Get account usage metrics sections with examples to README.md
    • Update dependency pinning in README.md

@skupriienko skupriienko self-assigned this Jul 7, 2025
@skupriienko skupriienko marked this pull request as ready for review July 7, 2025 14:50
@skupriienko skupriienko merged commit 3286687 into main Jul 12, 2025
17 checks passed
@skupriienko skupriienko deleted the DE-1564-Add-support-for-metrics-API branch July 12, 2025 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant