An open API service indexing awesome lists of open source software.

https://github.com/roryl23/pypvpnctl

ProtonVPN interface for Python
https://github.com/roryl23/pypvpnctl

protonvpn python3

Last synced: 3 months ago
JSON representation

ProtonVPN interface for Python

Awesome Lists containing this project

README

        

# Python ProtonVPN Controller for Linux

Provides a Python interface for controlling the
[ProtonVPN CLI](https://protonvpn.com/support/linux-vpn-tool/) client in Linux.

# Installation

`pip install git+https://github.com/rory-linehan/pypvpnctl`

# Usage

```python
import pypvpnctl
import time
for name in ['us-tx-01', 'us-tx-02', 'us-tx-03']:
status, message, result = pypvpnctl.connect(name, 'tcp')
if status is True:
time.sleep(600)
status, message, result = pypvpnctl.disconnect()
if status is False:
print(message + ': ' + str(result.stdout))
else:
print(message + ': ' + str(result.stdout))
sys.exit(1)
```