Outline API
Outline API is a wrapper api written in python to access Outline VPN API services. Outline VPN APIs are used for Outline keys maintenance as well as for monitoring purposes. The package also provides wrappers to access Prometheus on the Outline VPN.
Install
use pip to install the package:
pip install outline-api
Using package
import the package and cerate a management object.
from outline_api import (
Manager,
get_key_numbers,
get_active_keys)
apiurl = "http://127.0.0.1/apikey"
apicrt = "apicert"
manager = Manager(apiurl=apiurl, apicrt=apicrt)
new_key = manager.new()
if new_key is not None:
print(new_key)
keys = get_key_numbers("127.0.0.1", "999")
print(keys)
active_keys = get_active_keys("127.0.0.1", "999")
print(active_keys)
CHANGELOG
0.0.6 (2023-02-28)
- Add an optional label argument for new keys
0.0.5 (2021-10-29)
- Add custom error exceptions
0.0.4 (2021-10-27)
0.0.3 (2021-07-30)
- Fix return values in case of error
0.0.1 (2020-08-01)