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 import Fidloy
client = Fidloy(api_key="YOUR_API_KEY")
transactions = client.list_transactions(business_id=2)
for txn in transactions:
print("ID:", txn.get("id"), "Amount:", txn.get("amount"))
client.close()
base_url is optional and already defaults to the production API.
Simplest 2 Examples
Example 1: Show transactions
from fidloy import Fidloy
client = Fidloy(api_key="YOUR_API_KEY")
for txn in client.list_transactions(business_id=2):
print(txn.get("id"), txn.get("amount"))
client.close()
Example 2: Show customers
from fidloy import Fidloy
client = Fidloy(api_key="YOUR_API_KEY")
for customer in client.list_customers(business_id=2):
print(customer.get("id"), customer.get("first_name"), customer.get("phone"))
client.close()
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
Fidloyfacade 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_historyget_customer_rewards_historycreate_customercreate_transactioncreate_receiptcreate_webhookredeem_pointsredeem_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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fidloy_sdk-0.1.7.tar.gz.
File metadata
- Download URL: fidloy_sdk-0.1.7.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e13320c5ff9b405f7909af50dd9e01ecc52bc66f459bfcc5a39efb170ff564ef
|
|
| MD5 |
1fb15265d14e14d04bfa12cfb576844e
|
|
| BLAKE2b-256 |
cbbc67eff1759de195f5f4b409558168438be070e1830c0740d394fe66b91da9
|
Provenance
The following attestation bundles were made for fidloy_sdk-0.1.7.tar.gz:
Publisher:
publish-pypi.yml on bwanakweli4ever/fidloy_sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fidloy_sdk-0.1.7.tar.gz -
Subject digest:
e13320c5ff9b405f7909af50dd9e01ecc52bc66f459bfcc5a39efb170ff564ef - Sigstore transparency entry: 1080139251
- Sigstore integration time:
-
Permalink:
bwanakweli4ever/fidloy_sdk@99a4107ce5eb043f892fd34ae5aad0d4c1fac22e -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/bwanakweli4ever
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@99a4107ce5eb043f892fd34ae5aad0d4c1fac22e -
Trigger Event:
push
-
Statement type:
File details
Details for the file fidloy_sdk-0.1.7-py3-none-any.whl.
File metadata
- Download URL: fidloy_sdk-0.1.7-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ba6e2bb6de67ae9ec5f319ed4105ced56211f1783e00e561cdd0c8e9aee95fd
|
|
| MD5 |
ed894885aa9b04f90a0088d17c7c975b
|
|
| BLAKE2b-256 |
c0631a405541c830bada6dc5048a9513e6d8458009bd43b64161a4b998615714
|
Provenance
The following attestation bundles were made for fidloy_sdk-0.1.7-py3-none-any.whl:
Publisher:
publish-pypi.yml on bwanakweli4ever/fidloy_sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fidloy_sdk-0.1.7-py3-none-any.whl -
Subject digest:
7ba6e2bb6de67ae9ec5f319ed4105ced56211f1783e00e561cdd0c8e9aee95fd - Sigstore transparency entry: 1080139300
- Sigstore integration time:
-
Permalink:
bwanakweli4ever/fidloy_sdk@99a4107ce5eb043f892fd34ae5aad0d4c1fac22e -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/bwanakweli4ever
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@99a4107ce5eb043f892fd34ae5aad0d4c1fac22e -
Trigger Event:
push
-
Statement type: