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

Uploaded Python 3

File details

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

File metadata

  • Download URL: airvpn-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 7c398df8a3639fb54ab83ed259268347f9d6ce7af2eb6ba128a91d056efaeb04
MD5 dea69484bd452da33cea2a4ed5e614a5
BLAKE2b-256 14f4a6378f9bd64d738a040a481c1d5a4167f3ccc5a56b5c0c143e908a2cd907

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: airvpn-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 54f32d81f32e142ab3182296b4cc28f61259a76184343c61409f85722f82ba25
MD5 05eaadf7fc5256ef386cd462aced2bb4
BLAKE2b-256 67c7d3b2f44b7472fc1edfbac70e59ca9de9cf0a67b378b94e803be978e52860

See more details on using hashes here.

Provenance

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

This release

0.2.3 This release

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