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
  • Java (JNI)
  • .NET (C++/CLI, Windows)

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
DNP3_DOTNET OFF .NET bindings (Windows)
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)
├── java/                 Java bindings (JNI + Maven)
├── dotnet/               .NET bindings (C++/CLI)
├── 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.1.2.1.tar.gz (56.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.1.2.1-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

yadnp3-3.1.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.9 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

yadnp3-3.1.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.9 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

yadnp3-3.1.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.9 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

yadnp3-3.1.2.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.9 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

yadnp3-3.1.2.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.9 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.1.2.1.tar.gz.

File metadata

  • Download URL: yadnp3-3.1.2.1.tar.gz
  • Upload date:
  • Size: 56.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.1.2.1.tar.gz
Algorithm Hash digest
SHA256 dba70348b926938bfb4ca60ae70d0af36224a7578a1cb04ec794f1c0e59e2edd
MD5 b2f52cb43f34ec72e25d5f495ae797c8
BLAKE2b-256 7ece31c1ad25b1b8c886a6767467589c8b93b6b6216ecffa3713db938a4dfcfb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yadnp3-3.1.2.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.1.2.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 11471ee02f7482911d1a1d880e38197d5b137ec4c47259ece98c948437366da9
MD5 48f89c8bcc1e2293d40cf95bd77fc25b
BLAKE2b-256 6c72e54034683de4e0502671851f6d31d0fdbf3fb3442bfb19c6935581a17185

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yadnp3-3.1.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9ca44943b59552469ce68f43177f5b1c5f27d9251375da1e2ebab5509b85c780
MD5 6730f7d7557f895873492cf5fa3e7a79
BLAKE2b-256 6760340f7453a023c5e026d9bea3911f74fb5b1753d33bd6f438091a973fd2d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yadnp3-3.1.2.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.1.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d13cb842f5201b18053e7db89bec73fe97bdf27b97cc9d4cd77a5aa5c72c0a14
MD5 8128b5e119239f397df3161c049acd60
BLAKE2b-256 8f351f1951148cbaf8d6235d77bf68d7dd5c799f045f26a9a379b8a4ffe0f9d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yadnp3-3.1.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 270ac6ef688cec3883a9538c85ea2e925f0d0ba65d0460ba3bcdb207fea285cd
MD5 95ec9e660031f702368754091efef581
BLAKE2b-256 4b96da14e198180e6afe9f4a806f03091d67804ccb38120740e61b03d6c0a66f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yadnp3-3.1.2.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.1.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 05e7ce52a8426157e9f1c1e03c5876da4d4f4de7f662b31e46e590898a20f260
MD5 a8d0a4a95a3faa8b87bbf3ca1df3ec55
BLAKE2b-256 fd9d700617c49a5df845d3f0cc0c160210c11f73f70476c2ade1a7bd7f1edb5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yadnp3-3.1.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8a629d93d66fea8029e69994344d1076b4a10ec44815611d062fd035c3335994
MD5 1ba6953df77c9ee71dae0f22eb97c26e
BLAKE2b-256 a0bc161e52d973dd2c8aac22597ffa249b9115740e3251090c6cf94c3ec2a745

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yadnp3-3.1.2.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.1.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e4df6e54669f7327d7f212f66a93eb7fcd347feb79250bd30eb94f1fc0a2520f
MD5 4df78efec44e6a76038ee56ae18f0633
BLAKE2b-256 a7ebdd13d3e5dc5f942338afe65f935d494b9595227f0d91895bbdfdadd42afe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yadnp3-3.1.2.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a3b4d4a6c8ac55cdbc37e2c85b1e00fd8d397532f41c6d7391367430b53aa0d8
MD5 84e848c9c59188160deb435294e10bb9
BLAKE2b-256 50b7b1f78bcae9da5f38f5e25e3d40f727dc69cb1cdb580422ce33e017201359

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yadnp3-3.1.2.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.1.2.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cae5629ca1f3b68643203b81692c340b45025ea07d3335bdc0d469db662d3bd2
MD5 c4ccbe0cfe5cbfd0da64fedf902c8ef0
BLAKE2b-256 f1c69d9272e1aaa929482339d9717f0ecb453a2afc2a1746941a9bfb5c1b14d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yadnp3-3.1.2.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 08cfdfd89cd37ed5fc55bee44e7c207a1128efdf1dfb3ea691a6faa3a6ee3e4a
MD5 dce20f5a6a1df56a7319f9845afb45f7
BLAKE2b-256 83bd59d7ad6299e8cbb9f1f9c6e15f270ffdb75d3c724fa84e3833f93a6bd751

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