Python AirVPN
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 casesAirClient— 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51389d50f51919cc5d73ce603369875371c8e67c51a1b7bd212a4bd258cc5ce9
|
|
| MD5 |
d97f0ef8d20d87ec8173ecfbaa46b994
|
|
| BLAKE2b-256 |
7a49e9f9badf9e4e2c34611bc3df004db630740677f039e466d61878e42fe464
|
Provenance
The following attestation bundles were made for airvpn-0.2.0.tar.gz:
Publisher:
python-publish.yml on ch0nker/airvpn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
airvpn-0.2.0.tar.gz -
Subject digest:
51389d50f51919cc5d73ce603369875371c8e67c51a1b7bd212a4bd258cc5ce9 - Sigstore transparency entry: 2273155980
- Sigstore integration time:
-
Permalink:
ch0nker/airvpn@5eccbb047ab64c6381d7ca117b53e50564331d75 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/ch0nker
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5eccbb047ab64c6381d7ca117b53e50564331d75 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0b774174cfe880446e843004aee7d3b55cbfc4f9c90cc88bf26a649a75a5e5e
|
|
| MD5 |
0ee5c92cb64432f024d647a693c98819
|
|
| BLAKE2b-256 |
6242328478a01b407ad2ac4e3d7697cbe828607d98d1d46622ad8438d6bcab01
|
Provenance
The following attestation bundles were made for airvpn-0.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on ch0nker/airvpn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
airvpn-0.2.0-py3-none-any.whl -
Subject digest:
a0b774174cfe880446e843004aee7d3b55cbfc4f9c90cc88bf26a649a75a5e5e - Sigstore transparency entry: 2273156278
- Sigstore integration time:
-
Permalink:
ch0nker/airvpn@5eccbb047ab64c6381d7ca117b53e50564331d75 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/ch0nker
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5eccbb047ab64c6381d7ca117b53e50564331d75 -
Trigger Event:
release
-
Statement type: