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 Fidloy

client = Fidloy(api_key="YOUR_API_KEY")

transactions = client.transactions.list(business_id=2)

for txn in transactions:
    print(txn.get("id"), txn.get("amount"))

client.close()

base_url is optional and already defaults to the production API.

Also Available (Direct Client)

from fidloy_sdk import FidloyClient

client = FidloyClient(api_key="YOUR_API_KEY")
customer = client.create_customer(
    first_name="Alex",
    last_name="Bwana",
    business_id=2,
    phone="+250788000000",
)
print(customer)
client.close()

Main Features

  • API-key authenticated requests
  • Very simple Fidloy facade for beginners
  • 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.

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.4.tar.gz (6.0 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.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fidloy_sdk-0.1.4.tar.gz
  • Upload date:
  • Size: 6.0 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.4.tar.gz
Algorithm Hash digest
SHA256 7ac2fdca7599993a84b5ed91c9579a25e98185b1d0d3177ce7398875a38ae822
MD5 dcfbea65fcb379e805e8d5708def2353
BLAKE2b-256 d2350e31462cfc8f88a5c4f74d6684987cb714853f54dbf572e6c190f79290b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for fidloy_sdk-0.1.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: fidloy_sdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1dc0f2d1b18f6cae18bdbe4c1e42d598619da765c2b509f8713dadc6cf2786c6
MD5 cdaf03b3b8234edb3f5574f00f1ac208
BLAKE2b-256 8a41b4187e26cefe6610f16ae50995f295f40f06498ddac84bc3daa2d7cde8ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for fidloy_sdk-0.1.4-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