jieggii / python-wg-node-client

Python client library for wg-node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python client library for wg-node

This package implements all wg-node API methods and provides way to execute them asynchronously.

The only and the main class is WGNodeClient. WGNodeClientException is raised when API error occurs.

Autogenerated documentation:

class WGNodeClient(builtins.object)
 |  WGNodeClient(socket: str, *, public_key: rsa.key.PublicKey, private_key: rsa.key.PrivateKey, https: bool = False)
 |
 |  Methods defined here:
 |
 |  __init__(self, socket: str, *, public_key: rsa.key.PublicKey, private_key: rsa.key.PrivateKey, https: bool = False)
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  async api_user_create(self, public_key: str) -> dict[str, typing.Any]
 |      Creates API user.
 |
 |  async api_user_delete(self, public_key: str) -> dict[str, typing.Any]
 |      Deletes API user.
 |
 |  async node_status(self) -> dict[str, typing.Any]
 |      Returns information about node.
 |
 |  async node_wipe(self) -> dict[str, typing.Any]
 |      Removes all peers from node.
 |
 |  async peer_config(self, peer_id: str) -> str
 |      Returns peer config.
 |
 |  async peer_create(self, peer_id: str) -> dict[str, typing.Any]
 |      Creates new peer.
 |
 |  async peer_delete(self, peer_id: str) -> dict[str, typing.Any]
 |      Permanently deletes peer.
 |
 |  async peer_get(self, peer_id: str) -> dict[str, typing.Any]
 |      Returns information about peer.
 |
 |  async peer_update(self, peer_id: str, enabled: bool) -> dict[str, typing.Any]
 |      Enables or disables peer.
 |

About

Python client library for wg-node

License:MIT License


Languages

Language:Python 100.0%