Skip to main content

Python SDK for EmbiPay Admin and Agent APIs

Project description

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

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

embipay-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

embipay-1.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file embipay-1.0.0.tar.gz.

File metadata

  • Download URL: embipay-1.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for embipay-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a333d0a573dd16163e421acded8b61a40b16eb4175ed96441e24fa0552358804
MD5 e2705b73448406ab665716d3017c850c
BLAKE2b-256 50f1b7caa2d1b9b1cc1c3627db36c9ed68709ac652ed139a527d44104cdee926

See more details on using hashes here.

File details

Details for the file embipay-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: embipay-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for embipay-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79cb5a61148fae1b871fbb4a9b3cde598769675c78de9cf5dc052d753271c0cf
MD5 2b1ad4a25b13f6aba41fcbaebc82016d
BLAKE2b-256 4f37391efb23a889e0da56bf466815c7d101c590752f9d5e13866a1ffed6f49f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page