Skip to main content

Python AirVPN

Python versions PyPI version License Tests

A Python wrapper for AirVPN's API — manage devices, generate configs, check server status, and authenticate against AirVPN's bootstrap and web services.

Note: Docstrings and documentation were AI-assisted. If you spot any errors, please open a PR or an issue.

Installation

PyPI:

pip install airvpn

Locally:

git clone https://github.com/ch0nker/airvpn.git
pip install -e airvpn

Interfaces

This library exposes three interfaces depending on how much control you need:

  • AirVPN — high-level wrapper, best for most use cases
  • AirClient — low-level client for the encrypted bootstrap API (servers, manifest, status)
  • WebClient — client for AirVPN's website/session-based endpoints (account/profile actions)

Quick Start

AirVPN

Without an API key (limited to public endpoints like server status):

from airvpn import AirVPN

api = AirVPN()

for server in api.status.servers:
    print(server.public_name)

With an API key (required for account-specific actions like devices and config generation):

import os

from dotenv import load_dotenv
load_dotenv()

from airvpn import AirVPN

# Get your API key from https://airvpn.org/apisettings/
api = AirVPN(os.getenv("API_KEY"))
device = api.devices.get("test", create=True)

api.generator.download("config-directory", "earth", device.id)

AirClient

Without credentials:

from airvpn import AirClient

client = AirClient()
manifest = client.manifest()

print(manifest.time)

With credentials:

import os

from dotenv import load_dotenv
load_dotenv()

from airvpn import AirClient

client = AirClient()
user = client.login(os.getenv("LOGIN"), os.getenv("PASSWORD"))

print(user.login)

WebClient

import os

from dotenv import load_dotenv
load_dotenv()

from airvpn import WebClient

client = WebClient()
user = client.login(os.getenv("LOGIN"), os.getenv("PASSWORD"))

print(user.name, user.id)

Download files

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

Source Distribution

airvpn-0.2.5.tar.gz (39.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airvpn-0.2.5-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file airvpn-0.2.5.tar.gz.

File metadata

  • Download URL: airvpn-0.2.5.tar.gz
  • Upload date:
  • Size: 39.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for airvpn-0.2.5.tar.gz
Algorithm Hash digest
SHA256 56ae23ca883243af7adb94e8f2ba5b1189622df8c30115a13686ecc05de9e1cb
MD5 9149beb00de4cd9091d64db7ad484623
BLAKE2b-256 2f17c3baae56ced364a37ebcf8687e2c82702e726dfb20c51f18328cae99fef6

See more details on using hashes here.

Provenance

The following attestation bundles were made for airvpn-0.2.5.tar.gz:

Publisher: python-publish.yml on ch0nker/airvpn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file airvpn-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: airvpn-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 47.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for airvpn-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b87a954a0dfb3b70f779c1149b977f4397bd006571401a6793b2e2dab2783281
MD5 d6611e1bc9cd908eff4669490cc946b1
BLAKE2b-256 7167f652631a6a6f8791eae9f98158200bb0128841411bc8af2c49cc40ad063f

See more details on using hashes here.

Provenance

The following attestation bundles were made for airvpn-0.2.5-py3-none-any.whl:

Publisher: python-publish.yml on ch0nker/airvpn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

This release

0.2.5 This release

2 files

0.2.3

2 files

0.2.0

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

1 file

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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