Metadata-Version: 2.4
Name: baridimob
Version: 0.1.0
Summary: Open-source Python SDK for BaridiMob (Algérie Poste)
Author: BaridiMob SDK contributors
License: MIT
Project-URL: Homepage, https://github.com/baridimobsdk/baridimob
Project-URL: Repository, https://github.com/baridimobsdk/baridimob
Keywords: baridimob,algerie-poste,ccp,payment,sdk,algeria
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.27
Dynamic: license-file

# baridimob — Python SDK

Open-source SDK for **BaridiMob** (Algérie Poste).

> Work in progress — the public API is not stable yet.

## Install

```bash
pip install baridimob
```

## Quickstart

```python
from baridimob import Config, FileStorage, create_client

bm = create_client(Config(storage=FileStorage("./.baridimob/session.json")))

result = bm.auth.login("your-login", "your-password")
if result.state == "otp_required":
    bm.auth.request_device_otp()
    bm.auth.confirm_device("123456")

accounts = bm.accounts.list()
history = bm.accounts.transactions(accounts[0].number, page=1)

pending = bm.transfers.send(1000, accounts[0].number, "00799999000000000000")
# SMS is sent here; show the OTP screen, then:
receipt = pending.confirm("123456")
```

The device is confirmed once. Later logins on the same machine reuse the stored
device keys and need no OTP. Session expiry is handled automatically.

## Status

| Module | Status |
|--------|--------|
| core — signer, device keys, transport (form/JSON/binary), typed errors, storage | done (unit-tested) |
| auth — login, device OTP, logout, automatic re-login | done |
| accounts — list, detail, balance, history, find, iterate | done |
| payments — verify, categories, providers, check + exec (card), dynamic FPE | done |
| transfers — strategies, arm, request_otp, exec, send | done |
| receipts — recent operations, PDF download | done |
| profile — client identity and flags | done |
| cards | planned |
| cardless | planned |

## Security

- HTTPS is enforced. Plain `http://` is accepted only for `localhost` / `127.0.0.1`
  or when `allow_insecure=True` is set explicitly.
- The stored session is a live credential. Encrypt it at rest and never commit it.
- Money movement always requires an OTP supplied by the caller.

## Requirements

- Python >= 3.10
- `httpx`

## License

MIT
