Lightweight internal SDK for tracing Paylink payment operations - automatically logs and sends tool execution data to Paylink API
Project description
Paylink Tracer SDK
Lightweight internal SDK for tracing Paylink payment operations.
🚀 Quick Start
1. Install
uv add paylink-tracer
2. Configure
Set the required environment variables (or use a .env file):
PAYLINK_API_KEY=plk_live_xxxxx
PAYLINK_PROJECT=Demo Project
PAYMENT_PROVIDER=["mpesa"]
PAYLINK_TRACING=enabled
3. Use the Decorator
from paylink_tracer import paylink_tracer
@paylink_tracer
async def call_tool(name: str, arguments: dict):
# Your payment logic here
return {"status": "success", "message": "Payment processed"}
# Example call
await call_tool("stk_push", {"amount": "1000", "phone": "254700000000"})
🧠 Notes
- Automatically sends traces to
http://127.0.0.1:8000/api/v1/trace(local dev) - Use
set_base_url("https://api.paylink.co.ke")for production - Works with async functions
- Automatically captures errors, arguments, and timing
- Disable tracing with
PAYLINK_TRACING=disabled
👨💻 Internal Use Only
This SDK is intended for internal Paylink use.
For issues or updates, contact the Paylink engineering team.
📄 License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 paylink_tracer-0.1.5.tar.gz.
File metadata
- Download URL: paylink_tracer-0.1.5.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d803dae6b69812a061045b01f974ec86fa18e6693fb25eba1eb0332b64f14627
|
|
| MD5 |
d36a6a3904e71ec113cf019ea6e47d2c
|
|
| BLAKE2b-256 |
42176da79210eb2d1df5ec02e323ec34c0e0993a7197ead4b6b8344e35e7c44e
|
File details
Details for the file paylink_tracer-0.1.5-py3-none-any.whl.
File metadata
- Download URL: paylink_tracer-0.1.5-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83d025c920b3c85d2bf3e02c0f70a2899b817740bb929efdb87808d0b8ee0275
|
|
| MD5 |
26b5fde4c271d45f57648bd9fafd1894
|
|
| BLAKE2b-256 |
84b8d831f33881e75a664195e7a5cd4006260ff9098d757c3989f07d8f2f6c0d
|