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.5.0.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

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

outline_vpn_api-6.5.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file outline_vpn_api-6.5.0.tar.gz.

File metadata

  • Download URL: outline_vpn_api-6.5.0.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for outline_vpn_api-6.5.0.tar.gz
Algorithm Hash digest
SHA256 2028ee7e3e283a80b6f00b7ffd8c687e1ebd0df66f5fd98a22f4a8cfc7d09233
MD5 115456e9aebad317118bbb91e43c81ac
BLAKE2b-256 89248c38b122d5bd063182827880f714918091c9f654ddc1b9a7a8c210b7890d

See more details on using hashes here.

Provenance

The following attestation bundles were made for outline_vpn_api-6.5.0.tar.gz:

Publisher: publish.yml on jadolg/outline-vpn-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for outline_vpn_api-6.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8dde95c294e483e34bf3e3bb7410cc611d3e8b3ee94469a5a098046f60558508
MD5 3a3f26c6a59bb7f5dda7f8251e575663
BLAKE2b-256 732f6fa0e993c785970e41e869f8a01af56f5c3b84623773df4dabad5edce28c

See more details on using hashes here.

Provenance

The following attestation bundles were made for outline_vpn_api-6.5.0-py3-none-any.whl:

Publisher: publish.yml on jadolg/outline-vpn-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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