Metadata-Version: 2.4
Name: airvpn
Version: 0.1.8
Summary: A Python wrapper for the AirVPN API
Author: chonker
License: MIT
Project-URL: Homepage, https://github.com/ch0nker/airvpn
Project-URL: Changelog, https://github.com/ch0nker/airvpn/tree/main/docs/CHANGELOG.md
Project-URL: Documentation, https://github.com/ch0nker/airvpn/tree/main/docs/api/README.md
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Dynamic: license-file

# Python AirVPN Wrapper

[![Python versions](https://img.shields.io/pypi/pyversions/airvpn)](https://pypi.org/project/airvpn/)
[![PyPI version](https://img.shields.io/pypi/v/airvpn)](https://pypi.org/project/airvpn/)
[![License](https://img.shields.io/pypi/l/airvpn)](https://github.com/ch0nker/airvpn/blob/main/LICENSE)
[![Tests](https://github.com/ch0nker/airvpn/actions/workflows/python-tests.yml/badge.svg)](https://github.com/ch0nker/airvpn/actions/workflows/python-tests.yml)

> **Note:** The docstrings and documentation was generated with AI. If you spot any errors I haven't caught yet, please open a PR or an issue.

A Python wrapper for AirVPN's [API](https://airvpn.org/apisettings/).

## Guide
- [Changelog](docs/CHANGELOG.md)
- [Contributing](docs/CONTRIBUTING.md)
- [Example](#example)
- [API Documentation](docs/api/README.md)
- [Test Documentation](docs/tests/README.md)

## Installation

PyPI:
```bash
pip install airvpn
```

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

## Example
Without an API key:
```py
from airvpn import AirVPN

api = AirVPN()

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

With an API key:
```py
import os

from airvpn import AirVPN
from dotenv import load_dotenv

load_dotenv()
# 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("AirVPN-Earth.conf", "earth", device.id)
```
