Skip to main content

Python API wrapper for Outline VPN

Project description

outline-vpn-api

A Python API wrapper for Outline VPN

Test codecov

How to use

from outline_vpn.outline_vpn import OutlineVPN

# Setup the access with the API URL (Use the one provided to you after the server setup)
client = OutlineVPN(api_url="https://127.0.0.1:51083/xlUG4F5BBft4rSrIvDSWuw",
                    cert_sha256="4EFF7BB90BCE5D4A172D338DC91B5B9975E197E39E3FA4FC42353763C4E58765")

# Get all access URLs on the server
for key in client.get_keys():
    print(key.access_url)

# Create a new key
new_key = client.create_key()

# Or create a key with a specific attributes
key = client.create_key(
    key_id="new_key_001",
    name="Yet another test key",
    data_limit=1024 * 1024 * 20,
    method="aes-192-gcm",
    password="test",
    port=2323,
)

# Rename it
client.rename_key(new_key.key_id, "new_key")

# Delete it
client.delete_key(new_key.key_id)

# Set a monthly data limit for a key (20MB)
client.add_data_limit(new_key.key_id, 1000 * 1000 * 20)

# Remove the data limit
client.delete_data_limit(new_key.key_id)

API documentation

https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/Jigsaw-Code/outline-server/master/src/shadowbox/server/api.yml

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

outline-vpn-api-6.3.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

outline_vpn_api-6.3.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file outline-vpn-api-6.3.0.tar.gz.

File metadata

  • Download URL: outline-vpn-api-6.3.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for outline-vpn-api-6.3.0.tar.gz
Algorithm Hash digest
SHA256 72e1c2f3ef8ed8d885e708bf4b55abd8a3c353aaa85ccc64ef19811d57ac8421
MD5 e288baefaeff45084c93b8d358013b27
BLAKE2b-256 6fb99b230830b1d595353a35f946e9cb745f6fb1669fdd1c64bf3941ac7c44a7

See more details on using hashes here.

File details

Details for the file outline_vpn_api-6.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for outline_vpn_api-6.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 158776099b2ede1aa479d49ec3cefd3698de06a29d9c7d96b399425dc2bdab49
MD5 7815548044ec6976c1730d30fc02296f
BLAKE2b-256 372539361eff2e18df26ee8289bd9c979d2068ed4ce4adbe3600cceb4ae2586a

See more details on using hashes here.

Supported by

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