Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

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

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages