Skip to main content

Python Diameter Stack

This Python package provides tools to create and parse Diameter Messages and AVPs, to communicate with diameter peers using the diameter base protocol and to write diameter applications, as defined in the Diameter Base rfc6733.

The diameter stack supports transports over both TCP and SCTP.

The provided Application and Node implementations handle the majority of the basic protocol-level operations automatically, such as managing peer tables, sending CER/CEA, DWR/DEA and disconnecting with DPR/DPA.

Installation

The latest version can be installed from PyPI as python-diameter:

~# pip install python-diameter

SCTP support provided by an optional depency on pysctp.

Functional overview

The package contains an extensive AVP dictionary and allows constructing AVPs and Diameter messages either manually, or by parsing network-received bytes. Message AVPs can be accessed directly as instance attributes.

The diameter package provides tools for:

Supported applications

The diameter stack has inbuilt support for Diameter Base, Gy, Rf, Ro, Sy, Cx and Dx applications and a generic implementation of application types that allows working even with unsupported application types.

Supported diameter application commands

The diameter stack provides a Python command class for the following application message types:

Diameter Base Protocol rfc3588, rfc6733

  • Abort-Session
  • Accounting
  • Capabilities-Exchange
  • Device-Watchdog
  • Disconnect-PeerConnection
  • Re-Auth
  • Session-Termination

Diameter Mobile IPv4 rfc4004

  • AA-Mobile-Node
  • Home-Agent-MIP

Diameter Network Access Server rfc4005, rfc7155

  • AA
  • Abort-Session
  • Accounting
  • Re-Auth
  • Session-Termination

Diameter Credit Control rf4006, rfc6733, 3GPP TS 32.299

  • Credit-Control, with full 3GPP specification support

Diameter Extensible Authentication Protocol (EAP) rfc4072

  • Diameter-EAP

Diameter Policy and charging control 3GPP TS 29.219

  • Spending-Limit
  • Spending-Status-Notification

Diameter Cx and Dx interfaces 3GPP TS 29.229

  • User-Authorization
  • Server-Assignment
  • Location-Info
  • Multimedia-Auth
  • Registration-Termination
  • Push-Profile

Diameter S6a/S6d interface 3GPP TS 29.272

  • Update-Location
  • Cancel-Location-Request
  • Authentication-Information
  • Insert-Subscriber-Data
  • Delete-Subscriber-Data
  • Purge-UE
  • Reset
  • Notify

Diameter S13 interface 3GPP TS 29.272

  • ME-Identity-Check

Diameter S7a/S7d interface 3GPP TS 29.272

  • Update-VCSG-Location
  • Insert-Subscriber-Data
  • Delete-Subscriber-Data
  • Reset-Request
  • Cancel-VCSG-Location-Request

Diameter Sh interface 3GPP TS 29.329

  • User-Data
  • Profile-Update
  • Subscribe-Notifications
  • Push-Notification

The stack includes also a generic fallback Python class for every other message.

Metadata

Release files for python-diameter 0.9.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 python-diameter 0.9.0
File Size Uploaded
python_diameter-0.9.0.tar.gz 311.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-diameter 0.9.0
File Interpreter ABI Platform
python_diameter-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 600.0 kB

Release files / python_diameter-0.9.0.tar.gz

Download URL python_diameter-0.9.0.tar.gz
Size 311.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e0a8a9fbc83bc2da6ecdce62bde821e498821a23e69521a3d03a205515a3e568
BLAKE2b-256 checksum
How to use checksums
8c3508a137802e4b1ad95fc4e3ce77693c7a1e6e9eb12410f3fb86007c50b85f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / python_diameter-0.9.0-py3-none-any.whl

Download URL python_diameter-0.9.0-py3-none-any.whl
Size 288.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5ef067db631181a06578d8b1f33e8536425b318d8612aa48479ee3f4abf934d
BLAKE2b-256 checksum
How to use checksums
8f5c72909b543afd7cbeb77c200afe929a9136fe43f45b794fa5063e569d64d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.4

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.6.1

2 release files

0.5.6

2 release files

0.5.4

2 release files

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