python-diameter

A flexible diameter protocol stack written in python.

Current version: 0.9.0. See what's new.
Work with diameter messages

Automatic parsing of bytes transmitted over network into python instances with python attributes. An included dictionary recognises nearly 3000 AVPs for ~30 vendors.

Connect to diameter peers

An inbuilt diameter node implementation that handles incoming and outgoing connections with other peers, with automated CER, DWR and DPR handling and message routing towards applications. Supports TCP and SCTP.

Write diameter applications

Includes tools for writing diameter applications that can react to messages sent and received via network, where protocol-level messages are handled automatically and custom logic can be added.

Diameter command messages as python types

The stack recognises several commonly used diameter messages and provides direct read and write attribute access to their AVPs. For unkown command messages, a fallback implementation is also available, converting messages to read-only python instances.

Easily extendable

AVPs and command messages that are unknown to the stack can be added in runtime. Behaviour and definitiond of included AVPs and commands can also be easily overwritten.

Supported diameter base protocols and interfaces

The command messages for these diameter base protocol and 3GPP interfaces are implemented as Python classes, where AVPs can be accessed directly as instance attributes.