Python bindings for WireGuard's wg utility.
python3 setup.py install
In the following, the most common use cases are briefly explained.
For a full documentation, please refer to help(wgtools.<function>).
private_key = wgtools.genkey()public_key = wgtools.pubkey(private_key)keypair = wgtools.keypair()or
public_key, private_key = wgtools.keypair()The keypair object is a named tuple an can be unpacked
public_key, private_key = keypairor accessed by atributes
public_key = keypair.public
private_key = keypair.privatepsk = wgtools.genpsk()