Use typed synchronous and asynchronous clients to connect Python services to Ruba payments, billing, customers, and webhooks. The package supports Python 3.11 and newer.
pip install ruba-sdkimport os
from ruba import Ruba
with Ruba(access_token=os.environ["RUBA_ACCESS_TOKEN"]) as ruba:
products = ruba.products.list(limit=10)
for product in products.items:
print(product.name)import os
from ruba import RubaAsync
async with RubaAsync(access_token=os.environ["RUBA_ACCESS_TOKEN"]) as ruba:
products = await ruba.products.list(limit=10)The default endpoint is https://api.getruba.com. Pass base_url="https://sandbox-api.getruba.com" when working in the sandbox.
Full request and response documentation lives in the Ruba API reference. Bugs and SDK-specific requests can be reported through GitHub Issues.
MIT