Enterprise-grade async Python client for Outline VPN Server Management API
PyOutlineAPI is a modern, production-ready Python library for managing Outline VPN servers. It is async-first, type-safe, and designed for reliable operation in production.
Highlights:
- Async-first client built on aiohttp
- Certificate pinning + sensitive data protection
- Circuit breaker, health monitoring, retries with backoff
- Typed models (Pydantic v2) + rich validation
- Batch operations and rate limiting
Requirements: Python 3.10+
Using pip:
pip install pyoutlineapiUsing uv (recommended):
uv add pyoutlineapiOptional dependencies:
# Development tools
pip install pyoutlineapi[dev]# Generate .env template
python -c "from pyoutlineapi import quick_setup; quick_setup()"
# Edit .env.example → .env
OUTLINE_API_URL=https://your-server.com:12345/your-secret-path
OUTLINE_CERT_SHA256=your-64-character-sha256-fingerprintfrom pyoutlineapi import AsyncOutlineClient
import asyncio
async def main():
async with AsyncOutlineClient.from_env() as client:
server = await client.get_server_info()
print(f"Server: {server.name} (v{server.version})")
key = await client.create_access_key(name="Alice")
print(f"Access URL: {key.access_url}")
keys = await client.get_access_keys()
print(f"Total keys: {keys.count}")
asyncio.run(main())Detailed examples and guides are in docs/guides/. Start with the index:
- Guides index (full list)
- Access keys
- Server management
- Metrics
- Enterprise features
- Configuration
- Error handling
- Best practices
MIT. See LICENSE.