Skip to main content

Official Python SDK for the Fidloy API

Project description

Fidloy Python SDK

Official Python SDK for the Fidloy API.

Install

pip install fidloy-sdk

Quick Start

from fidloy_sdk import FidloyClient

client = FidloyClient(
    api_key="YOUR_API_KEY",
    base_url="https://api.fidloy.com/api"
)

history = client.get_rewards_history(
    business_id=1,
    customer_id=123,
    event_type="reward_redeemed",
    page=1,
    page_size=20,
)

print(history)

customer = client.create_customer(
    first_name="Alex",
    last_name="Bwana",
    email="alex@example.com",
    phone="+250788000000",
    business_id=1,
)

tx = client.create_transaction(
    customer_id=customer.get("id", 123),
    business_id=1,
    amount=15000,
    store_name="Main Branch",
    transaction_date="2026-03-11T12:00:00Z",
)

client.close()

Main Features

  • API-key authenticated requests
  • Customer-in-business reward history helper methods
  • Customer and transaction creation helpers
  • Points and coupon redemption helpers
  • Receipt and webhook creation helpers
  • Typed, predictable exceptions
  • Configurable timeout and headers

Core Methods

  • get_rewards_history
  • get_customer_rewards_history
  • create_customer
  • create_transaction
  • create_receipt
  • create_webhook
  • redeem_points
  • redeem_coupon

Publish to PyPI

Recommended: Trusted Publishing (GitHub Actions)

Follow PYPI_RELEASE_CHECKLIST.md to configure PyPI Trusted Publisher.

Then publish by creating a GitHub Release for your version tag.

Manual upload (fallback)

python -m pip install --upgrade build twine
python -m build
python -m twine upload dist/*

Use a PyPI token when uploading.

fidloy_sdk

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

fidloy_sdk-0.1.3.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

fidloy_sdk-0.1.3-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file fidloy_sdk-0.1.3.tar.gz.

File metadata

  • Download URL: fidloy_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fidloy_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 efe383eef7162d17a3414e48c51416f13d8a6aea01f95fa1fb96ca565ea08973
MD5 d947a52641bd3cc94dd5d3da8080a4fb
BLAKE2b-256 05141ed718d0594e25e43919fd9fcb52eddbb99058f176d8116f0592a3298cb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for fidloy_sdk-0.1.3.tar.gz:

Publisher: publish-pypi.yml on bwanakweli4ever/fidloy_sdk

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

File details

Details for the file fidloy_sdk-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: fidloy_sdk-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fidloy_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e59dfb7af6fa96797dcf7846dac3b8e4592ce24fa0112afc34ed1c77671d5f03
MD5 564c5db46f91747adbd1b3447b37ae46
BLAKE2b-256 cbe9f650e4b4477aecb9915853e90dbc41b41f69035e49244f73e1d09f7a7945

See more details on using hashes here.

Provenance

The following attestation bundles were made for fidloy_sdk-0.1.3-py3-none-any.whl:

Publisher: publish-pypi.yml on bwanakweli4ever/fidloy_sdk

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