Skip to main content

OpenVPN Status Reader

CI build status https://coveralls.io/repos/openwisp/openvpn-status-reader/badge.svg 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.1

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.1
File Size Uploaded Provenance Actions
openvpn_status_reader-0.3.1.tar.gz 12.4 kB With provenance Details for openvpn_status_reader-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 21.5 kB

Release files / openvpn_status_reader-0.3.1.tar.gz

Download URL openvpn_status_reader-0.3.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bd820af405efb32761805bab560a9fdc5d75f93df2ea69e0679070354e646a29
BLAKE2b-256 checksum
How to use checksums
cc6ddbffb16ce2cd922fcdabc29e6d59ceb8a4c9db17281ecdb059ed62ad6df2
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 26, 2026.

Transparency log

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

Download URL openvpn_status_reader-0.3.1-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c7fd92dcb16b93fb1501328d2bb66b76a90ad397c778e51688bec0aa31aef7b
BLAKE2b-256 checksum
How to use checksums
ec5ad1a32cc0fe6901141a5b089b8953f2230dc511463b48273791a551f39d73
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 26, 2026.

Transparency log

Security for openvpn-status-reader 0.3.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openvpn_status_reader-0.3.1.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 26, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.1 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