Skip to main content

Official Python SDK for Ripllo — discounts, referrals, abandoned cart, pixels, feeds, blog + creator marketplace (campaigns, programs, collaborations), marketing (channels, contacts, contact-lists, marketing campaigns, funnels, inbox, audience segments), insights, API keys, audit log, billing, integrations, uploads, profiles (merchant/creator/affiliator), KYC, disputes. Platform-partner mode for Storlaunch (Pattern 2 HMAC partner-billing).

Project description

ripllo (Python)

Official Python SDK for Ripllo — Forjio's marketing / creator-marketplace product. Mirrors the surface of @forjio/ripllo-node 0.2.2 1:1.

Install

pip install ripllo

Auth

Ripllo uses Pattern 2 HMAC partner-billing — same scheme Storlaunch and Fulkruma use to talk to Ripllo. Every request is signed with HMAC-SHA256 over METHOD\nPATH\nTIMESTAMP\nSHA256(BODY) (plus an optional trailing \nIDEMPOTENCY_KEY segment).

from ripllo import RiplloClient

rip = RiplloClient(
    key_id="AKIARPLO...",
    secret="...",
    base_url="https://ripllo.com",  # default
)

For platform-admin keys, scope a single client to a specific merchant by passing on_behalf_of=... or calling rip.for_merchant(account_id).

Resources

Every Node SDK namespace is reproduced as a snake_case attribute on the Python client:

Node Python
discountCodes discount_codes
pixels pixels
feeds feeds
blog blog
abandonedCart abandoned_cart
referrals referrals
apiKeys api_keys
webhooks webhooks
auditLog audit_log
integrations integrations
billing billing
uploads uploads
campaigns campaigns
programs programs
collaborations collaborations
insights insights
channels channels
contacts contacts
contactLists contact_lists
broadcasts broadcasts (alias: marketing_campaigns)
funnels funnels
inbox inbox
audienceSegments audience_segments
merchantProfile merchant_profile
creatorProfile creator_profile
affiliatorProfile affiliator_profile
marketplace marketplace
affiliates affiliates
kyc kyc
creatorStats creator_stats
admin admin

Method names follow the same translation (listEnrollmentslist_enrollments, setStepsset_steps, etc.). The short aliases shipped in Node 0.2.1 are preserved.

A couple of method names collide with Python keywords and get a trailing underscore:

  • contacts.import (Node) → contacts.import_ (Python)
  • admin.partnerUsage({ from, to })admin.partner_usage(from_=..., to=...)

Examples

# List discount codes
rip.discount_codes.list(limit=20)

# Create a referral program
rip.referrals.put_program({
    "rewardType": "percent",
    "referrerValue": 10,
    "refereeValue": 5,
    "currency": "IDR",
})

# Storefront-public read of merchant pixels
rip.pixels.public("acc_abc123")

# Generic passthrough — for partner backends relaying merchant-portal
# requests without hand-writing a typed method per resource.
rip.passthrough("GET", "/api/v1/some/route")

Webhooks

from flask import Flask, request, abort
from ripllo import verify_webhook, RiplloError
import os

app = Flask(__name__)
SECRET = os.environ["RIPLLO_WEBHOOK_SECRET"]

@app.post("/webhooks/ripllo")
def ripllo_webhook():
    try:
        event = verify_webhook(
            raw_body=request.get_data(),  # bytes, unparsed!
            signature=request.headers.get("Ripllo-Signature"),
            secret=SECRET,
        )
    except RiplloError:
        abort(400)
    # event = {"id": ..., "type": ..., "occurredAt": ..., "data": ..., "metadata": ...}
    return "", 204

Errors

All failures raise RiplloError(status, code, message, request_id). status=0 indicates a transport-level error (network / timeout / non-JSON response). Higher statuses come from the API envelope.

Versioning

This SDK targets the Ripllo API surface of @forjio/ripllo-node 0.2.2. Both packages are versioned independently — the HMAC-signing wire protocol is stable across both.

License

MIT

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

ripllo-0.1.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

ripllo-0.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file ripllo-0.1.0.tar.gz.

File metadata

  • Download URL: ripllo-0.1.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ripllo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8d4a2c81d1efd1ccb01d205635759c1a1b028a537982d5ec44a757d0f1d225d2
MD5 110aaa95ca475e2a31f422f09f8d3cdb
BLAKE2b-256 ac925dcfbe5b5db521b39730335b5353e0fb83749f3b5b4004c12df85251400f

See more details on using hashes here.

File details

Details for the file ripllo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ripllo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ripllo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6263502d50ca6797874b39795ddb805d7fefb72cecbafd00f092e745d5893c21
MD5 8521f27297e9d3cb645821e585272407
BLAKE2b-256 7706d02b2c0e610409d30962f424c82937b2046fa10dbb4d407e7ba8726e42b6

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