Skip to main content

OpenVPN Status Reader

CI build status https://coveralls.io/repos/openwisp/openvpn-status-reader/badge.svg Dependency monitoring https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square https://badge.fury.io/py/openvpn-status-reader.svg downloads code style: black

openvpn-status-reader is an OpenWISP-maintained Python library for parsing OpenVPN status-version-1 logs into Python data structures. It supports both legacy and current numeric OpenVPN timestamps.

This project is a fork of the original openvpn-status repository. It retains the openvpn_status import namespace for compatibility.

It supports Python 3.11 and newer.

Installation

pip install openvpn-status-reader

Don’t forget to put it in setup.py / requirements.txt.

Getting Started

You could configure your OpenVPN server to log for client status. In usual it could be achieved by adding status /path/to/openvpn-status.log line to /etc/openvpn/openvpn.conf. For example:

proto udp
port 1194
dev tun0
status /var/run/openvpn-status.log

Once OpenVPN server running, the log file will be created and written. It looks like:

OpenVPN CLIENT LIST
Updated,Thu Jun 18 08:12:15 2015
Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
foo@example.com,10.10.10.10:49502,334948,1973012,Thu Jun 18 04:23:03 2015
bar@example.com,10.10.10.10:64169,1817262,28981224,Thu Jun 18 04:08:39 2015
ROUTING TABLE
Virtual Address,Common Name,Real Address,Last Ref
192.168.255.134,foo@example.com,10.10.10.10:49502,Thu Jun 18 08:12:09 2015
192.168.255.126,bar@example.com,10.10.10.10:64169,Thu Jun 18 08:11:55 2015
GLOBAL STATS
Max bcast/mcast queue length,0
END

Now we could parse log file with this library:

from openvpn_status import parse_status

with open("/var/run/openvpn-status.log") as logfile:
    status = parse_status(logfile.read())

print(status.updated_at)  # datetime.datetime(2015, 6, 18, 8, 12, 15)

foo_client = status.client_list["169.254.0.1"]
print(foo_client.common_name)  # foo@example.com
print(foo_client.bytes_received)  # 334.9 kB
print(foo_client.bytes_sent)  # 2.0 MB
print(int(foo_client.bytes_sent))  # 2097152

More details are in the API reference.

Metadata

Release files for openvpn-status-reader 0.3.0

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

Source distribution (sdist)

Source distribution for openvpn-status-reader 0.3.0
File Size Uploaded Provenance
openvpn_status_reader-0.3.0.tar.gz 12.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openvpn-status-reader 0.3.0
File Interpreter ABI Platform
openvpn_status_reader-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.4 kB

Release files / openvpn_status_reader-0.3.0.tar.gz

Download URL openvpn_status_reader-0.3.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2d7cee265365b0e2756ba74e9e6f808604a56589f383627edf3b1639b27ec7a1
BLAKE2b-256 checksum
How to use checksums
15bd1baf2a1863977ff01c1d5e0bf7d03177cca369d8a983b6ae6f5c7852d7f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / openvpn_status_reader-0.3.0-py3-none-any.whl

Download URL openvpn_status_reader-0.3.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e34bcd268eeb9eb2cb11acecaa5bfb2dad32b4d1e1060715419f646e09885945
BLAKE2b-256 checksum
How to use checksums
8c1c31ef6574e4e457ba3721bd7e248183e9786f83da8982ed6a9eaae367de9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for openvpn-status-reader 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openvpn_status_reader-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

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