Skip to main content

Python bindings for yadnp3 -- Yet Another opendnp3 fork (IEEE-1815 DNP3 protocol)

Project description

yadnp3

Yet Another opendnp3 fork -- an experimental fork of opendnp3, the de facto reference implementation of the DNP3 (IEEE-1815) protocol stack.

The upstream project reached end-of-life on September 1, 2022. This fork extends it with new protocol features, Python bindings, and modern CI.

For commercial or production use, consider Step Function I/O's DNP3 library — a modern, commercially supported Rust implementation with C, C++, Java, and .NET bindings.

Features

Protocol — Master operations:

  • Integrity / class / range / all-objects scans (periodic and on-demand)
  • Select-before-operate and direct-operate commands (CROB, analog outputs)
  • File transfer: read, write, delete, get info, directory listing, abort, authenticate
  • Device attributes (Group 0)
  • Analog input dead bands (Group 34)
  • Freeze operations
  • Cold/warm restart
  • Time synchronization (LAN and serial modes)
  • Link status check

Protocol — Outstation:

  • Static and event reporting for all standard data types
  • Unsolicited responses with configurable retries
  • Command handling (select/operate, direct operate)
  • File transfer handler interface
  • Broadcast support
  • Configurable event buffer and class assignment

Transports:

  • TCP client and server
  • Outstation TCP client mode (outstation connects to master)
  • UDP
  • Serial
  • TLS (client and server, requires OpenSSL)

Bindings:

  • Python (pybind11) — pip install yadnp3 (primary focus of this fork)
  • Java (JNI) and .NET (C++/CLI) bindings exist from upstream but are not actively maintained in this fork

Python Quick Start

pip install yadnp3
import opendnp3

# Create a manager with 1 thread
manager = opendnp3.DNP3Manager(1)

# ... create channels, masters, outstations
# See python/tests/ for full examples

manager.Shutdown()

Building from Source

Prerequisites

  • CMake >= 3.11
  • C++14 compiler (GCC, Clang, or MSVC 2015+)
  • OpenSSL >= 1.1.1 (optional, for TLS)
  • Python 3.9+ and pybind11 (optional, for Python bindings)

Quick Build

mkdir build && cd build
cmake .. -DDNP3_TLS=ON -DDNP3_TESTS=ON
cmake --build . --parallel $(nproc)
ctest --output-on-failure

CMake Options

Option Default Description
DNP3_TLS OFF TLS support (requires OpenSSL)
DNP3_TESTS OFF Unit and integration tests
DNP3_EXAMPLES OFF Example applications
DNP3_PYTHON OFF Python bindings (pybind11)
DNP3_JAVA OFF Java JNI bindings (upstream, not maintained)
DNP3_DOTNET OFF .NET bindings (upstream, Windows, not maintained)
DNP3_STATIC_LIBS platform Static libraries
DNP3_EVERYTHING OFF All optional targets

Python Wheel (Docker)

docker build -f Dockerfile --build-arg PYTHON_VERSION=3.12 -t yadnp3-build .
docker create --name whl yadnp3-build
docker cp whl:/wheels/. ./dist/
docker rm whl
pip install dist/*.whl

Project Structure

yadnp3/
├── cpp/lib/              Core C++ library (~79k lines)
│   ├── include/opendnp3/ Public API headers
│   └── src/              Private implementation
├── cpp/tests/            Unit, integration, and interop tests
├── cpp/examples/         Example master/outstation applications
├── python/               Python bindings (pybind11, actively maintained)
├── java/                 Java bindings (JNI + Maven, upstream, not maintained)
├── dotnet/               .NET bindings (C++/CLI, upstream, not maintained)
├── generation/           Code generation (Scala/SBT)
├── Dockerfile            Linux wheel build
└── .github/workflows/    CI (build, test, wheel packaging)

License

Licensed under the Apache License 2.0.

Copyright (c) 2010-2011 Green Energy Corp Copyright (c) 2013-2022 Step Function I/O LLC Copyright (c) 2024-2026 f0rw4rd (yadnp3 fork) Copyright (c) 2010-2022 various contributors

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

yadnp3-3.2.1.1.tar.gz (63.7 kB view details)

Uploaded Source

Built Distributions

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

yadnp3-3.2.1.1-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

yadnp3-3.2.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

yadnp3-3.2.1.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

yadnp3-3.2.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

yadnp3-3.2.1.1-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

yadnp3-3.2.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

yadnp3-3.2.1.1-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

yadnp3-3.2.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

yadnp3-3.2.1.1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

yadnp3-3.2.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file yadnp3-3.2.1.1.tar.gz.

File metadata

  • Download URL: yadnp3-3.2.1.1.tar.gz
  • Upload date:
  • Size: 63.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yadnp3-3.2.1.1.tar.gz
Algorithm Hash digest
SHA256 07b3876b2c74e35652e19f7d41a5933445548dd06e0c4f5dfc3bab88b694558f
MD5 300c1ea94e6cbaf4943313cab3af2f65
BLAKE2b-256 5db023b2fa51e250c2346ab6cb52d696a6817657b171ec7337db5d6ad2793821

See more details on using hashes here.

File details

Details for the file yadnp3-3.2.1.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: yadnp3-3.2.1.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yadnp3-3.2.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 071e4d94ef7d14ab919ce5813681999d3ef86d8feec51247954ded34f237af4c
MD5 f46e9e9fb38aa6a8a4ee81265eea44f8
BLAKE2b-256 1b62a2345f60f807ea7f0f5dc48750842773ffeac8e4d557000931d0c6ad6cd3

See more details on using hashes here.

File details

Details for the file yadnp3-3.2.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for yadnp3-3.2.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 27a9e85a66efdf91684e68ea13fc4239c640b77343b3acbe67d95b1be901ee1e
MD5 535881f0b26fc0fd30cd23287f373302
BLAKE2b-256 10f848787bccdc45a84e523d21486f449e7d415334a1da15dd1a9b6d15a7a7b1

See more details on using hashes here.

File details

Details for the file yadnp3-3.2.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: yadnp3-3.2.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yadnp3-3.2.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5abe641748806a988279c95373c56b78d0355396982b63496dc63af2e746d21d
MD5 edb2da97b1b0f05c71ae146b0ece75ee
BLAKE2b-256 73492f4e2a4c78b85a50746838a4264f0110796a91365af90d8c3ea12779830c

See more details on using hashes here.

File details

Details for the file yadnp3-3.2.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for yadnp3-3.2.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 003138b8a2568cb035761cd45ffa642ad08b59088da8152a63b12e3c5ad60f2e
MD5 794f8d62002fbbbdddb0b014bb6974cf
BLAKE2b-256 2b179da787a6f4056a6901b43e5c79efc899f7ae3042a6620288b51840187d0d

See more details on using hashes here.

File details

Details for the file yadnp3-3.2.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: yadnp3-3.2.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yadnp3-3.2.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e476e6734ee56b639455fbee2800b72367424c19350c4f0ec0c5253b8b6d9a85
MD5 651da7f2406129396d55d79d48b414e5
BLAKE2b-256 b9786bd013f9ae8aed4cc672b8c9dfbc65bf8feb2fd1bfd6f01bbf994cd4870d

See more details on using hashes here.

File details

Details for the file yadnp3-3.2.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for yadnp3-3.2.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 225f444ba69c74ea10e28647adf13e8c9c2da56d47b5b322deca9cc984a739d3
MD5 72afe9dc57d71ce6a4efc6d7d9927aea
BLAKE2b-256 552c4703bb8c62704c8188215dd7065999f3d9cf668738a1dd2b2d3609ec3b9e

See more details on using hashes here.

File details

Details for the file yadnp3-3.2.1.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: yadnp3-3.2.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yadnp3-3.2.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 71dfb7425e138316152bec1c3e372ac9c6c1004754171be1e19e9e451f9740ac
MD5 2fadae4036283bdfc96bb91f3180d5b4
BLAKE2b-256 603acd63f7ea06d21da3eb2a3c05b5c716344af2e2f54fbce8add62d35a821b0

See more details on using hashes here.

File details

Details for the file yadnp3-3.2.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for yadnp3-3.2.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 863c361fdcb1c19a2c8c895b2fe0d43ed2a4e2ba576afa817dc18d4cac6236db
MD5 09ea6d2ad249364d77ccb5e36e52e10b
BLAKE2b-256 474f98899617c5f428927d71827889d1c774c1ccd1179503238fcea0a3284978

See more details on using hashes here.

File details

Details for the file yadnp3-3.2.1.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: yadnp3-3.2.1.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yadnp3-3.2.1.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ad312e8d72b43d0300a66e2422af00d3fefac8a7efd3ae90d112bcac3fcc8fa3
MD5 533648873c43246089bf78e5a996c247
BLAKE2b-256 8c8cc4bbfc04a2a1f641aaf9e9f21a02a0ba9e34ca2598122cc7f070c178d3b2

See more details on using hashes here.

File details

Details for the file yadnp3-3.2.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for yadnp3-3.2.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 73b121b6dd0e52a9aef09a6e98e42ae140cc08e249e947a6a9015d6ae96f14de
MD5 6c67aac4ffaee7f47a5c24d68cacc720
BLAKE2b-256 ba7034b832ff31c8cf8761104fb12950657cacce8f2c222d932a6ba86b34472c

See more details on using hashes here.

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