Skip to main content

A Python library for the Trophy API

Project description

Trophy Python SDK

The Trophy Python SDK provides convenient access to the Trophy API from applications written in the Python language.

Trophy provides APIs and tools for adding gamification to your application, keeping users engaged through rewards, achievements, streaks, and personalized communication.

Installation

You can install the package via pip:

pip install trophy

Usage

The package needs to be configured with your account's API key which is available in the Trophy dashboard.

from trophy import EventRequestUser, TrophyApi

client = TrophyApi(
    api_key="YOUR_API_KEY",
)

client.metrics.event(
    key="words-written",
    user=EventRequestUser(
        id="18",
        email="jk.rowling@harrypotter.com",
        tz="Europe/London",
    ),
    value=750.0,
)

Documentation

See the Trophy API Docs for more information on the accessible endpoints.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trophy-1.5.0.tar.gz (63.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trophy-1.5.0-py3-none-any.whl (144.9 kB view details)

Uploaded Python 3

File details

Details for the file trophy-1.5.0.tar.gz.

File metadata

  • Download URL: trophy-1.5.0.tar.gz
  • Upload date:
  • Size: 63.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for trophy-1.5.0.tar.gz
Algorithm Hash digest
SHA256 a1937c51b231d5b9ce641f0da0a6b5772619742ed2d6831fa8da19b724362444
MD5 f9b0b1fef0eac23f77c047b7fe84f351
BLAKE2b-256 fb715d07b59f693c39a635b79fa13f5b08ea0edb25629e5fdccc20d54f13721c

See more details on using hashes here.

Provenance

The following attestation bundles were made for trophy-1.5.0.tar.gz:

Publisher: publish-package.yml on trophyso/trophy-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trophy-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: trophy-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 144.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for trophy-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3256d50b0b6c0cc865dddde2d62ad2a8960c52fd13ff9f24729a136563f404f
MD5 d5f8544b76242fc0b25e0512da375c2f
BLAKE2b-256 37d7f5713c76ad4d7537b7d2846a70b87f94ade8bdab7ae2e35d347f279bf855

See more details on using hashes here.

Provenance

The following attestation bundles were made for trophy-1.5.0-py3-none-any.whl:

Publisher: publish-package.yml on trophyso/trophy-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page