eps-sdk 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- eps_sdk-0.1.0/.gitignore +86 -0
- eps_sdk-0.1.0/LICENSE +31 -0
- eps_sdk-0.1.0/PKG-INFO +92 -0
- eps_sdk-0.1.0/README.md +74 -0
- eps_sdk-0.1.0/data/sdk-surface.json +3924 -0
- eps_sdk-0.1.0/pyproject.toml +45 -0
- eps_sdk-0.1.0/src/eps_sdk/__init__.py +33 -0
- eps_sdk-0.1.0/src/eps_sdk/client.py +412 -0
- eps_sdk-0.1.0/tests/test_client.py +273 -0
eps_sdk-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Bun lockfiles — project standardizes on npm (package-lock.json). Block re-adds.
|
|
2
|
+
bun.lock
|
|
3
|
+
bun.lockb
|
|
4
|
+
|
|
5
|
+
# Logs
|
|
6
|
+
logs
|
|
7
|
+
*.log
|
|
8
|
+
npm-debug.log*
|
|
9
|
+
yarn-debug.log*
|
|
10
|
+
yarn-error.log*
|
|
11
|
+
pnpm-debug.log*
|
|
12
|
+
lerna-debug.log*
|
|
13
|
+
|
|
14
|
+
node_modules
|
|
15
|
+
dist
|
|
16
|
+
dist-ssr
|
|
17
|
+
*.local
|
|
18
|
+
|
|
19
|
+
# Baked agent/SDK artifacts — generated from src/ at build time (npm run bake:all).
|
|
20
|
+
# Never committed; created fresh on every root build and on package prepublish.
|
|
21
|
+
packages/*/data/
|
|
22
|
+
|
|
23
|
+
# Python build/test litter (packages/sdk-python)
|
|
24
|
+
__pycache__/
|
|
25
|
+
*.py[cod]
|
|
26
|
+
*.egg-info/
|
|
27
|
+
.pytest_cache/
|
|
28
|
+
|
|
29
|
+
# Env files (never commit secrets); keep .env.example tracked
|
|
30
|
+
.env
|
|
31
|
+
.env.*
|
|
32
|
+
!.env.example
|
|
33
|
+
|
|
34
|
+
# VM-side deploy secrets (poller image pin + GHCR auth); samples are tracked
|
|
35
|
+
deploy.env
|
|
36
|
+
!deploy.env.sample
|
|
37
|
+
.ghcr-auth.json
|
|
38
|
+
|
|
39
|
+
# Internal planning/strategy docs — kept locally, never committed (not for the
|
|
40
|
+
# public repo). Removed from tracking before open-sourcing.
|
|
41
|
+
docs/local-roadmap/
|
|
42
|
+
# Override the global (~/.config/git/ignore) exclude so this repo tracks SDD docs.
|
|
43
|
+
!docs/superpowers/
|
|
44
|
+
|
|
45
|
+
# Graphify (https://github.com/Graphify-Labs/graphify)
|
|
46
|
+
# graphify-out/ is regenerated on every `graphify update .` — ignore it wholesale.
|
|
47
|
+
# Two exceptions are LLM-derived and expensive to recreate, so the team shares them:
|
|
48
|
+
# .graphify_labels.json(+.sig) — community names + membership signatures
|
|
49
|
+
# cache/semantic/ — extraction results, content-addressed and portable
|
|
50
|
+
# With both committed, a fresh clone rebuilds the full graph via `graphify .` at no API cost.
|
|
51
|
+
# Each level must be re-included before its children are re-excluded: git will not
|
|
52
|
+
# descend into an excluded directory.
|
|
53
|
+
graphify-out/*
|
|
54
|
+
!graphify-out/.graphify_labels.json
|
|
55
|
+
!graphify-out/.graphify_labels.json.sig
|
|
56
|
+
!graphify-out/cache/
|
|
57
|
+
graphify-out/cache/*
|
|
58
|
+
!graphify-out/cache/semantic/
|
|
59
|
+
.rebuild.lock
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# Ignore TypeScript incremental compilation cache
|
|
63
|
+
*.tsbuildinfo
|
|
64
|
+
|
|
65
|
+
# Editor directories and files
|
|
66
|
+
.vscode/*
|
|
67
|
+
!.vscode/extensions.json
|
|
68
|
+
.idea
|
|
69
|
+
.DS_Store
|
|
70
|
+
*.suo
|
|
71
|
+
*.ntvs*
|
|
72
|
+
*.njsproj
|
|
73
|
+
*.sln
|
|
74
|
+
*.sw?
|
|
75
|
+
|
|
76
|
+
# Playwright MCP debug artifacts
|
|
77
|
+
.playwright-mcp/
|
|
78
|
+
.superpowers/
|
|
79
|
+
.ds-sync/
|
|
80
|
+
ds-bundle/
|
|
81
|
+
.design-sync/.cache/
|
|
82
|
+
.design-sync/node_modules
|
|
83
|
+
.design-sync/styles-src.css
|
|
84
|
+
|
|
85
|
+
# graphify settings backup written by `graphify claude install`
|
|
86
|
+
.claude/settings.json.graphify-bak
|
eps_sdk-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Eko Bharat Ventures Private Limited
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Trademark notice: This license applies to the source code of this project. The
|
|
26
|
+
"Eko" and "Eko Platform Services" / "EPS" names, logos, and brand assets are
|
|
27
|
+
trademarks of Eko Bharat Ventures Private Limited and are NOT licensed for
|
|
28
|
+
use under the terms above. The MIT permission grant confers no trademark
|
|
29
|
+
rights. Marketing copy, page content, and design/brand assets bundled in this
|
|
30
|
+
repository may be subject to separate terms; the MIT grant covers the software
|
|
31
|
+
(code) only.
|
eps_sdk-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: eps-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Backend-only Python SDK for Eko Platform Services (EPS) APIs, with request signing built in.
|
|
5
|
+
Project-URL: Homepage, https://eps.eko.in/docs
|
|
6
|
+
Project-URL: Source, https://github.com/ekoindia/eps-platform/tree/main/packages/sdk-python
|
|
7
|
+
Author: Eko Bharat Ventures Pvt Ltd
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: aeps,bbps,dmt,eko,eps,fintech,india,kyc
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# EPS Python SDK
|
|
20
|
+
|
|
21
|
+
Backend-only Python client for [Eko Platform Services](https://eps.eko.in/docs)
|
|
22
|
+
APIs — DMT, AePS, BBPS, KYC and verification — with HMAC request signing built
|
|
23
|
+
in.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install eps-sdk
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from eps_sdk import EpsClient
|
|
31
|
+
|
|
32
|
+
client = EpsClient(
|
|
33
|
+
developer_key="<your_developer_key>",
|
|
34
|
+
access_key="<your_access_key>",
|
|
35
|
+
environment="sandbox", # or "production"
|
|
36
|
+
initiator_id="9962981729", # registered mobile of the API user
|
|
37
|
+
user_code="20810200", # retailer/agent code
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
sender = client.call("dmt-get-sender", {"customer_id": "9123456789"})
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
One generic `call(slug, params)` covers every endpoint. The slug list, each
|
|
44
|
+
endpoint's params and which of them are required all come from the same
|
|
45
|
+
generated API surface the docs are built from, so the client validates your
|
|
46
|
+
input **before** it signs and sends anything.
|
|
47
|
+
|
|
48
|
+
## Backend only
|
|
49
|
+
|
|
50
|
+
`access_key` signs every request. Never run this in anything a browser can
|
|
51
|
+
reach — a leaked access key lets anyone transact as you.
|
|
52
|
+
|
|
53
|
+
## What it does for you
|
|
54
|
+
|
|
55
|
+
- **Signs the request** — `secret-key`, `secret-key-timestamp` and
|
|
56
|
+
`developer_key` headers on every call.
|
|
57
|
+
- **Validates first** — missing required params and wrong types raise `EpsError`
|
|
58
|
+
before a request goes out.
|
|
59
|
+
- **Routes the params** — path tokens, query string, JSON body, or
|
|
60
|
+
`multipart/form-data` for file-upload endpoints, per the endpoint's spec.
|
|
61
|
+
- **Fails loudly** — a non-2xx response raises `EpsHttpError` (with the decoded
|
|
62
|
+
envelope on `.body`); a non-JSON body raises rather than returning `{}`.
|
|
63
|
+
|
|
64
|
+
Files can be a path or an in-memory pair:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
client.call("activate-aeps-fingpay", {
|
|
68
|
+
"pan_card": "/path/to/pan.jpg",
|
|
69
|
+
"aadhar_front": ("aadhar.jpg", image_bytes),
|
|
70
|
+
# ...
|
|
71
|
+
})
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Zero dependencies
|
|
75
|
+
|
|
76
|
+
Standard library only (`urllib`, `hmac`, `json`). Nothing to keep patched.
|
|
77
|
+
|
|
78
|
+
## Development
|
|
79
|
+
|
|
80
|
+
The runtime asset `data/sdk-surface.json` is generated from the API specs, not
|
|
81
|
+
committed. From the repo root:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm run build # bakes data/sdk-surface.json
|
|
85
|
+
cd packages/sdk-python
|
|
86
|
+
PYTHONPATH=src python3 -m unittest discover -s tests
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The test suite is the cross-language conformance suite described in
|
|
90
|
+
`docs/sdk-golden-vector.md` — the same cases the Node.js and PHP SDKs must pass.
|
|
91
|
+
|
|
92
|
+
MIT licensed.
|
eps_sdk-0.1.0/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# EPS Python SDK
|
|
2
|
+
|
|
3
|
+
Backend-only Python client for [Eko Platform Services](https://eps.eko.in/docs)
|
|
4
|
+
APIs — DMT, AePS, BBPS, KYC and verification — with HMAC request signing built
|
|
5
|
+
in.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install eps-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
from eps_sdk import EpsClient
|
|
13
|
+
|
|
14
|
+
client = EpsClient(
|
|
15
|
+
developer_key="<your_developer_key>",
|
|
16
|
+
access_key="<your_access_key>",
|
|
17
|
+
environment="sandbox", # or "production"
|
|
18
|
+
initiator_id="9962981729", # registered mobile of the API user
|
|
19
|
+
user_code="20810200", # retailer/agent code
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
sender = client.call("dmt-get-sender", {"customer_id": "9123456789"})
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
One generic `call(slug, params)` covers every endpoint. The slug list, each
|
|
26
|
+
endpoint's params and which of them are required all come from the same
|
|
27
|
+
generated API surface the docs are built from, so the client validates your
|
|
28
|
+
input **before** it signs and sends anything.
|
|
29
|
+
|
|
30
|
+
## Backend only
|
|
31
|
+
|
|
32
|
+
`access_key` signs every request. Never run this in anything a browser can
|
|
33
|
+
reach — a leaked access key lets anyone transact as you.
|
|
34
|
+
|
|
35
|
+
## What it does for you
|
|
36
|
+
|
|
37
|
+
- **Signs the request** — `secret-key`, `secret-key-timestamp` and
|
|
38
|
+
`developer_key` headers on every call.
|
|
39
|
+
- **Validates first** — missing required params and wrong types raise `EpsError`
|
|
40
|
+
before a request goes out.
|
|
41
|
+
- **Routes the params** — path tokens, query string, JSON body, or
|
|
42
|
+
`multipart/form-data` for file-upload endpoints, per the endpoint's spec.
|
|
43
|
+
- **Fails loudly** — a non-2xx response raises `EpsHttpError` (with the decoded
|
|
44
|
+
envelope on `.body`); a non-JSON body raises rather than returning `{}`.
|
|
45
|
+
|
|
46
|
+
Files can be a path or an in-memory pair:
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
client.call("activate-aeps-fingpay", {
|
|
50
|
+
"pan_card": "/path/to/pan.jpg",
|
|
51
|
+
"aadhar_front": ("aadhar.jpg", image_bytes),
|
|
52
|
+
# ...
|
|
53
|
+
})
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Zero dependencies
|
|
57
|
+
|
|
58
|
+
Standard library only (`urllib`, `hmac`, `json`). Nothing to keep patched.
|
|
59
|
+
|
|
60
|
+
## Development
|
|
61
|
+
|
|
62
|
+
The runtime asset `data/sdk-surface.json` is generated from the API specs, not
|
|
63
|
+
committed. From the repo root:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npm run build # bakes data/sdk-surface.json
|
|
67
|
+
cd packages/sdk-python
|
|
68
|
+
PYTHONPATH=src python3 -m unittest discover -s tests
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The test suite is the cross-language conformance suite described in
|
|
72
|
+
`docs/sdk-golden-vector.md` — the same cases the Node.js and PHP SDKs must pass.
|
|
73
|
+
|
|
74
|
+
MIT licensed.
|