Skip to main content

Python AirVPN

Python versions PyPI version License Tests

A Python wrapper for AirVPN's API.

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

Installation

From PyPI:

pip install airvpn

From source:

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

Interfaces

The library exposes four interfaces, depending on how much control you need:

  • AirVPN — high-level wrapper; the best starting point for most use cases.
  • AirClient — low-level client for the encrypted bootstrap API.
  • AirAPI — client for AirVPN's authenticated REST API.
  • WebClient — client for AirVPN's website/session-based endpoints.

Quick Start

AirVPN

Log in immediately, by passing credentials on construction. This is the simplest path if you just want to get to work:

import os

from dotenv import load_dotenv
load_dotenv()

from airvpn import AirVPN

vpn = AirVPN(os.getenv("LOGIN"), os.getenv("PASSWORD"))

# Create (or fetch) a device and download a config for it
device = vpn.api.devices.get("test", create=True)
vpn.api.generator.download("config-directory", "earth", device.id)

Defer login, if you need to construct the object before credentials are available (e.g. in a CLI or app that prompts for them later):

from airvpn import AirVPN

vpn = AirVPN()

# ... later, once you have credentials ...
vpn.login(username, password)

print(vpn.client.name)

Skip the web login entirely, if you already have an API key secret saved from a previous session:

import os

from dotenv import load_dotenv
load_dotenv()

from airvpn import AirVPN

vpn = AirVPN(api_key=os.getenv("API_KEY"))

device = vpn.api.devices.get("test", create=True)

Bootstrap

An AirVPN instance always has a bootstrap client available, no login required, for public data like server manifests:

from airvpn import AirVPN

vpn = AirVPN()
manifest = vpn.bootstrap.manifest()

print(manifest.time)

Metadata

Release files for airvpn 0.2.13

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

Source distribution (sdist)

Source distribution for airvpn 0.2.13
File Size Uploaded Provenance
airvpn-0.2.13.tar.gz 59.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for airvpn 0.2.13
File Interpreter ABI Platform
airvpn-0.2.13-py3-none-any.whl Python 3 none any Details

Total release size: 133.7 kB

Release files / airvpn-0.2.13.tar.gz

Download URL airvpn-0.2.13.tar.gz
Size 59.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bbc95457be0439d2a58e25f71dcf64872f9f993c2d39f0be765f5f30ecfe9bb1
BLAKE2b-256 checksum
How to use checksums
3b041087d61e7aa37aa7b444c2fd8ad21179116f8ce14654eca1be7c9681b2e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release files / airvpn-0.2.13-py3-none-any.whl

Download URL airvpn-0.2.13-py3-none-any.whl
Size 74.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
054e63d290a1850eec93a8c93dd28f5f8459dc160bcf4cc8538d277ccb6d9781
BLAKE2b-256 checksum
How to use checksums
786ce46a2cf674395bc3297af6e9f2fc0e820d1f8f7b1970c18fd1be618bc83c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Security for airvpn 0.2.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for airvpn-0.2.13.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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