Installation¶
Requirements¶
| Minimum | |
|---|---|
| TypeScript | Node.js 20+ (or Bun 1.0+) |
| Python | Python 3.11+ |
Server-side only
Both SDKs load private keys and certificates. Run them only on the server.
TypeScript¶
bun add @deuriib/dgii-ecf
# or
npm install @deuriib/dgii-ecf
import { ECF, Environment, P12Reader, Signature } from '@deuriib/dgii-ecf';
Python¶
uv add py-dgii-ecf
# or
pip install py-dgii-ecf
from py_dgii_ecf import ECF, Environment, P12Reader, Signature
Certificates¶
You need a DGII .p12 certificate (from
DigiFirma).
- Keep the
.p12and its password in a secret manager — never commit them. - The certificate expires; track and rotate it before it lapses.
from py_dgii_ecf import P12Reader
info = P12Reader(password).get_certificate_info("identity.p12")
if info.is_ok():
print(info.unwrap().valid_to)