Skip to main content

EPS Python SDK

Backend-only Python client for Eko Platform Services APIs — DMT, AePS, BBPS, KYC and verification — with HMAC request signing built in.

pip install eps-sdk
from eps_sdk import EpsClient

client = EpsClient(
    developer_key="<your_developer_key>",
    access_key="<your_access_key>",
    environment="sandbox",      # or "production"
    initiator_id="9962981729",  # registered mobile of the API user
    user_code="20810200",       # retailer/agent code
    timeout=30.0,               # whole-request budget in seconds (default)
)

sender = client.call("dmt-get-sender", {"customer_id": "9123456789"})

One generic call(slug, params) covers every endpoint. The slug list, each endpoint's params and which of them are required all come from the same generated API surface the docs are built from, so the client validates your input before it signs and sends anything.

timeout is the whole-request budget in seconds, defaulting to 30.0 — the same 30s every EPS SDK defaults to. (Node names its knob timeout_ms / timeoutMs because it is milliseconds there.) The response and error contract is shared by all five SDKs; see docs/sdk-golden-vector.md.

Backend only

access_key signs every request. Never run this in anything a browser can reach — a leaked access key lets anyone transact as you.

What it does for you

  • Signs the request — secret-key, secret-key-timestamp and developer_key headers on every call.
  • Validates first — missing required params and wrong types raise EpsError before a request goes out.
  • Routes the params — path tokens, query string, JSON body, or multipart/form-data for file-upload endpoints, per the endpoint's spec.
  • Fails loudly — a non-2xx response raises EpsHttpError (with the decoded envelope on .body); a non-JSON body raises rather than returning {}.
  • Never loses a transaction — every non-GET call carries a client_ref_id (yours, or a generated 15-char one). A money-moving call that times out is looked up by that ref and surfaced as EpsIndeterminateError with the inquiry result attached, never silently re-sent.
  • Retries the safe things — a call that times out or gets a 429/5xx is retried with jittered backoff (retries, default 2) only when the endpoint is marked retrySafe (idempotent, free, moves no money). Paid lookups and money-moving calls are never re-sent.
  • Validates values too — spec-driven format / enum / range / length rules (dates, PAN, IFSC, client_ref_id …) fail before the request is signed.

Files can be a path or an in-memory pair:

client.call("activate-aeps-fingpay", {
    "pan_card": "/path/to/pan.jpg",
    "aadhar_front": ("aadhar.jpg", image_bytes),
    # ...
})

Reconciling an indeterminate transaction:

from eps_sdk import EpsIndeterminateError

try:
    client.call("bbps-pay-bill", {...})
except EpsIndeterminateError as err:
    # err.client_ref_id — persist it; err.status_check["data"]["tx_status"]:
    # "0" success, "1" fail, "2" awaited. Inquire again later with
    # client.call("transaction-inquiry", {"client_ref_id": err.client_ref_id})
    ...

Knobs: retries (2), retry_base_delay (0.2 s), auto_status_check (True).

Zero dependencies

Standard library only (urllib, hmac, json). Nothing to keep patched.

Development

The runtime asset data/sdk-surface.json is generated from the API specs, not committed. From the repo root:

npm run build                            # bakes data/sdk-surface.json
cd packages/sdk-python
PYTHONPATH=src python3 -m unittest discover -s tests

The test suite is the cross-language conformance suite described in docs/sdk-golden-vector.md — the same cases the Node.js and PHP SDKs must pass.

MIT licensed.

Metadata

Release files for eps-sdk 3.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eps-sdk 3.0.11
File Size Uploaded
eps_sdk-3.0.11.tar.gz 24.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eps-sdk 3.0.11
File Interpreter ABI Platform
eps_sdk-3.0.11-py3-none-any.whl Python 3 none any Details

Total release size: 44.2 kB

Release files / eps_sdk-3.0.11.tar.gz

Download URL eps_sdk-3.0.11.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5665d425d987ada2d4b7be1ad4c1c64f269ff4f70137bf235b64b5f45bc2e30d
BLAKE2b-256 checksum
How to use checksums
df92347768159a99eea9e7e5b86e5f395bf6c60b6bb95922d321b15937fffdbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / eps_sdk-3.0.11-py3-none-any.whl

Download URL eps_sdk-3.0.11-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b242caaecd81ef30a9d0b857599754b7f89698105bffc44b02cc8f3bf6dd06eb
BLAKE2b-256 checksum
How to use checksums
ddb392b3c454d65bca40fd11340f87dcdff0d7c0169f300c8dfcf958b5755817
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.11 This release

2 release files

3.0.10

2 release files

3.0.9

2 release files

3.0.8

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page