Skip to main content

About

The strongSwan VICI protocol allows external applications to monitor, configure and control the IKE daemon charon. This Python package provides a native client side implementation of the VICI protocol, well suited to script automated tasks in a reliable way.

Basic Usage

>>> import vici
>>> s = vici.Session()
>>> s.version()
OrderedDict([('daemon', b'charon'), ('version', b'5.4.0'),
('sysname', b'Linux'), ('release', b'3.13.0-27-generic'), ('machine', b'x86_64')])
>>> s.load_pool({"p1": {"addrs": "10.0.0.0/24"}})
OrderedDict([('success', b'yes')])
>>> s.get_pools()
OrderedDict([('p1', OrderedDict([('base', b'10.0.0.0'), ('size', b'254'),
('online', b'0'), ('offline', b'0')]))])

Event Handling

Either use the convenient decorators provided by EventListener or directly call listen() on a Session object to loop over received events and dispatch them manually.

>>> import vici
>>> s = vici.Session()
>>> l = vici.EventListener(s)
>>> @l.on_events(['ike-updown', 'ike-rekey'])
... def ike_events(name, data):
...   """Handle event with given 'name' and 'data'."""
...   print(name, data)
...
>>> @l.on_events(['child-updown', 'child-rekey'])
... def child_events(name, data):
...   print(name, data)
...
>>> l.listen()

Metadata

Release files for vici 6.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vici 6.0.3
File Size Uploaded
vici-6.0.3.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vici 6.0.3
File Interpreter ABI Platform
vici-6.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / vici-6.0.3.tar.gz

Download URL vici-6.0.3.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ec926e7a29b6ea9112fe406d1851c3c46143ac625e28089e3d4efce4eac88e56
BLAKE2b-256 checksum
How to use checksums
578388b626e3f62dc986cd7ce2fa9fb37d9b3259fbc7a3864a51b98e5c516ec7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / vici-6.0.3-py3-none-any.whl

Download URL vici-6.0.3-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
734f52b57e329fbd58f3bffd1305d6546be174aeb35bc4a2ef45c257e95ad924
BLAKE2b-256 checksum
How to use checksums
e889241f45ca169e43bc0104a3696f020c11eebcb195c2c9631b798c026de469
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page