Please make sure to update tests as appropriate. Please open an issue first to discuss what you would like to change. connect ( verbose = True, timeout = 20 ) # Disconnect vpn. status () # equivalent to `piactl get connectionstate` # Will connect to server, displaying status in stdout vpn. Set_debug_logging(value=False) Enable client debug logging.Įxample from piapy import PiaVpn # Instantiate vpn = PiaVpn () # Get connection status vpn. As per the documentation this only resets daemon settings, no GUI settings. Reset_settings() Resets settings to the defaults. Status() Returns client conection status.ĭisconnected, Connecting, StillConnecting, Connected, Interrupted, Reconnecting, StillReconnecting, DisconnectingToReconnect, Disconnecting Ip() Returns the current VPN IP address, if connected and the address is known timeout (type: int) will disconnect if connection not possible before timeout.verbose (type: bool) cause to display connecting status in stdout.'': set the server to a specific name, must be in the available list.Ĭonnect(verbose=False, timeout=20) Cause the client to connect.'random': set a random server from the available list.'auto': use client auto select feature to set server with least latency.If client is already connected will disconnect and connect to new selected server. Set_region(server='auto') Cause the client to connect to selected server next time it connects. Region() Returns string of current selected server name. Regions() Returns list of strings with available servers. PIA client must be running to use the connect method. If it does not run, please check PIA Desktop: Command Line Interface documentation. Iif you get something like 2.0.1+04518 you are good to go. pip install piapyĬommand piactl must be available from your terminal. Use the package manager pip to install piapy. Intended to facilitate the operation of the PIA client from within Python. Python wrapper around the command line interface for The Private Internet Access Desktop Client.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |