77d6cd5b92675afcc74710e6a51a876ac73fb940
IDRS API
Python (FastAPI + SQLite) server that mirrors the live idrs-api endpoints, with a login-protected admin panel to manage the data.
GET /api/getTokenInfo→ token list (position ASC,decimalsint,is_livebool)GET /api/version/android→ version recordGET /img/<filename>→ uploaded token icons/admin→ sqladmin panel (login-protected): manage tokens, version, upload icons
Setup
python3.12 -m venv venv
./venv/bin/pip install -r requirements.txt
cp .env.example .env # set ADMIN_USERNAME / ADMIN_PASSWORD
Run
./run.sh # http://127.0.0.1:8000 (admin at /admin)
run.sh loads .env. First run seeds the DB from tokenList.json and versionAndroid.json (idrs.db is created here; override path via IDRS_DB_PATH).
Notes
- Auth: single admin, credentials from
ADMIN_USERNAME/ADMIN_PASSWORDenv. If they're unset, login is refused and a warning is logged (fail closed). Session secret is auto-generated on first run and stored in.session_secret. The public API endpoints stay unauthenticated. - Version rule:
acceptableVersion≤latestVersionis enforced in the panel; belowacceptableVersionthe Android app force-updates, belowlatestVersionit prompts. - Icons: upload PNGs in the admin panel (Icons page);
iconUrlauto-points to/img/<filename>. - No on-chain integration, no audit trail — data is entered manually.
Languages
Python
97.9%
Dockerfile
1.5%
Shell
0.6%