This python library offers an implementation of the Extended Triple Diffie-Hellman key agreement protocol (X3DH) as specified here.
The goal is to provide a configurable and independent implementation of the protocol, while keeping the structure close to the specification.
This library is currently in a very early state, most of the code has not been tested at all, there are probably bugs.
You can find usage examples in the repository of the OMEMO library, which uses this lib.