Skip to content

EmbiPay/EmbiPay-SDK-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmbiPay Python SDK

Client library for EmbiPay Admin and Agent APIs.

Installation

pip install embipay

Or install from source for development:

git clone https://github.com/EmbiPay/EmbiPay-SDK-Python.git
cd EmbiPay-SDK-Python
pip install -e .

Usage

Admin API

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")

Agent API

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")

About

Python client for EmbiPay Admin and Agent APIs: wallets, tasks, loans, pools. Use from scripts or your app backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages