Skip to main content

Production-ready async Python client for Outline VPN Server API with enterprise-grade features and full type safety.

Project description

PyOutlineAPI

Enterprise-grade async Python client for Outline VPN Server Management API

tests codecov Security Rating Maintainability Rating Vulnerabilities

PyPI - Downloads PyPI - Version Python Version License


Overview

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

Installation

Requirements: Python 3.10+

Using pip:

pip install pyoutlineapi

Using uv (recommended):

uv add pyoutlineapi

Optional dependencies:

# Development tools
pip install pyoutlineapi[dev]

Quick Start

1) Setup configuration

# 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-fingerprint

2) Minimal usage

from 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())

Documentation

Detailed examples and guides are in docs/guides/. Start with the index:


License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyoutlineapi-0.4.0.tar.gz (102.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyoutlineapi-0.4.0-py3-none-any.whl (81.1 kB view details)

Uploaded Python 3

File details

Details for the file pyoutlineapi-0.4.0.tar.gz.

File metadata

  • Download URL: pyoutlineapi-0.4.0.tar.gz
  • Upload date:
  • Size: 102.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for pyoutlineapi-0.4.0.tar.gz
Algorithm Hash digest
SHA256 fcd5dea7e4952277a6e8b3f6710fdb1d1cde9f06635ed1fb91bf06992545ee11
MD5 d329f83c6c6ba6ec5b20dfccd689c4ec
BLAKE2b-256 de47a3464b5f4215fc2bdecedeed8519673d348031dc7000200c6e9388927093

See more details on using hashes here.

File details

Details for the file pyoutlineapi-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pyoutlineapi-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 81.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for pyoutlineapi-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70bd406558957dcb5997aada587a0e217c7b9a4b9ffe73b3948fadd7635fd994
MD5 1155e4beae37813863397d99ffa8a68d
BLAKE2b-256 2982f4f4926f42dd38e01deb7114107c06c05af78878023ecae05311dd4887ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page