Skip to main content

A Python library to connect to NordVPN, works on Windows and Linux

Project description

NordVPN-connect

This repo has been forked from https://github.com/kboghe/NordVPN-switcher by Kristof Boghe.
Thank you for your work.

Description

This lib allows you to connect to a NordVPN server. Works on Windows and Linux.

Install

pip install nordvpn-connect

Simple Usage

from nordvpn_connect import initialize_vpn, rotate_VPN, close_vpn_connection

# optional, use this on Linux and if you are not logged in when using nordvpn command

settings = initialize_vpn("France")  # starts nordvpn and stuff
rotate_VPN(settings)  # actually connect to server

# YOUR STUFF

close_vpn_connection(settings)

Usage with credentials (Only Linux)

If when you use nordvpn command it asks you for credentials, you'll need to provide them to the initialize_vpn function.

from nordvpn_connect import initialize_vpn, rotate_VPN, close_vpn_connection

# optional, use this on Linux and if you are not logged in when using nordvpn command

settings = initialize_vpn("France", "USERNAME", "PASSWORD")  # starts nordvpn and stuff
rotate_VPN(settings)  # actually connect to server

# YOUR STUFF

close_vpn_connection(settings)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nordvpn-connect-0.0.7.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

nordvpn_connect-0.0.7-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page