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.0.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.0-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: airvpn-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 51389d50f51919cc5d73ce603369875371c8e67c51a1b7bd212a4bd258cc5ce9
MD5 d97f0ef8d20d87ec8173ecfbaa46b994
BLAKE2b-256 7a49e9f9badf9e4e2c34611bc3df004db630740677f039e466d61878e42fe464

See more details on using hashes here.

Provenance

The following attestation bundles were made for airvpn-0.2.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: airvpn-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 47.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0b774174cfe880446e843004aee7d3b55cbfc4f9c90cc88bf26a649a75a5e5e
MD5 0ee5c92cb64432f024d647a693c98819
BLAKE2b-256 6242328478a01b407ad2ac4e3d7697cbe828607d98d1d46622ad8438d6bcab01

See more details on using hashes here.

Provenance

The following attestation bundles were made for airvpn-0.2.0-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

0.2.5

2 files

0.2.3

2 files

This release

0.2.0 This release

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