The btclib organization website
The projects
btclib-ecc is elliptic curve arithmetic, and the signature, key-agreement and commitment schemes built on it, in typed Python.
It works over any curve in short Weierstrass form. It provides ECDSA, BIP340
Schnorr, MuSig2, FROST and Diffie-Hellman among others. It is fully annotated
and ships py.typed.
python -m pip install --upgrade "btclib-ecc[secp256k1]"
The secp256k1 extra installs the libsecp256k1 bindings, btclib-secp256k1,
which do the secp256k1 arithmetic. Without them every call still answers, on
Python arithmetic that is slower and not constant-time.