Skip to main content

nyord-vpn

A simple and reliable NordVPN client for macOS with support for both legacy OpenVPN and njord APIs.

Features

  • Simple and reliable VPN connection management
  • Support for both legacy OpenVPN and njord APIs
  • Country selection
  • Basic status monitoring
  • Clear error messages
  • Minimal dependencies

Installation

# Install system requirements
brew install openvpn

# Install package
pip install nyord-vpn

# Optional: Install njord support
pip install nyord-vpn[njord]

Usage

Environment Variables

Set your NordVPN credentials:

export NORD_USER="your-username"
export NORD_PASSWORD="your-password"

CLI Commands

# Connect to VPN (defaults to US)
nyord-vpn connect

# Connect to specific country
nyord-vpn connect --country netherlands

# Use njord API
nyord-vpn --api njord connect

# Enable debug logging
nyord-vpn --verbose connect

# Check status
nyord-vpn status

# List available countries
nyord-vpn list-countries

# Disconnect
nyord-vpn disconnect

Python API

from nyord_vpn.core.factory import create_client

# Create client (legacy or njord)
client = create_client("legacy")

# Connect to VPN
client.connect("netherlands")

# Check status
status = client.status()
print(f"Connected to {status['server']} ({status['ip']})")

# Disconnect
client.disconnect()

Development

# Install dependencies
pip install -r requirements.txt

# Install optional njord support
pip install njord

# Run with debug logging
NORD_USER="username" NORD_PASSWORD="password" nyord-vpn --verbose connect

Error Handling

The client uses simple retry logic for API calls and provides clear error messages. Common errors:

  • VPNCredentialsError: Missing or invalid credentials
  • VPNConnectionError: Failed to connect/disconnect
  • VPNConfigError: Configuration issues (e.g., missing OpenVPN)
  • VPNServerError: Failed to get server information

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

MIT

Release files for nyord-vpn 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nyord-vpn 0.1.0
File Size Uploaded
nyord_vpn-0.1.0.tar.gz 451.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nyord-vpn 0.1.0
File Interpreter ABI Platform
nyord_vpn-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 481.7 kB

Release files / nyord_vpn-0.1.0.tar.gz

Download URL nyord_vpn-0.1.0.tar.gz
Size 451.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4228b41535b112a0c532a3e22e788ce5af4e05188b806c87eddcf028e37286ef
BLAKE2b-256 checksum
How to use checksums
ff3d18cfae02a135606e432bfb603e355851bd5cc7aae31ad887e3f019bf7813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / nyord_vpn-0.1.0-py3-none-any.whl

Download URL nyord_vpn-0.1.0-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4b1e74007514d2df6b1b157f68133e1e549cd914d87db305a334d2d86334f8d
BLAKE2b-256 checksum
How to use checksums
96994effbbb19e2068ea53ed53c55da287600f1a769ceefeca8cfe014d6f153d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page