Client library for EmbiPay Admin and Agent APIs.
pip install embipayOr install from source for development:
git clone https://github.com/EmbiPay/EmbiPay-SDK-Python.git
cd EmbiPay-SDK-Python
pip install -e .from embipay import EmbiPayAdmin
admin = EmbiPayAdmin(
"https://embi-pay-dashboard.vercel.app",
"your_admin_api_token"
)
# Create wallet
result = admin.create_wallet(owner_user_id="uuid-from-supabase-auth", balance=100)
wallet = result["wallet"]
# Create pool
result = admin.create_shared_pool("resource-123", 50)
pool = result["pool"]
# Contribute to pool
admin.contribute_to_pool(pool["pool_id"], wallet["agent_id"], 10, usage_limit=5)
# Approve loan
admin.approve_loan(5)
# Record repayment
admin.record_repayment(5, 100, "Paid in full")from embipay import EmbiPayAgent
agent = EmbiPayAgent(
"https://embi-pay-dashboard.vercel.app",
"your_agent_key"
)
tasks = agent.fetch_tasks()
agent.complete_task(tasks["tasks"][0]["id"], "completed", "Done")