Skip to main content
https://github.com/pyradius/pyrad/actions/workflows/python-test.yml/badge.svg?branch=master https://coveralls.io/repos/github/pyradius/pyrad/badge.svg?branch=master https://img.shields.io/pypi/v/pyrad.svg https://img.shields.io/pypi/pyversions/pyrad.svg https://img.shields.io/pypi/dm/pyrad.svg Documentation Status https://img.shields.io/pypi/l/pyrad.svg https://img.shields.io/badge/Chat-darkgreen

Introduction

pyrad is an implementation of a RADIUS client/server as described in RFC2865. It takes care of all the details like building RADIUS packets, sending them and decoding responses.

Here is an example of doing a authentication request:

from pyrad.client import Client
from pyrad.dictionary import Dictionary
import pyrad.packet

srv = Client(
    server="localhost",
    secret=b"Kah3choteereethiejeimaeziecumi",
    dict=Dictionary("dictionary"),
)

# create request
req = srv.CreateAuthPacket(
    code=pyrad.packet.AccessRequest, User_Name="wichert", NAS_Identifier="localhost"
)
req["User-Password"] = req.PwCrypt("password")

# send request
reply = srv.SendPacket(req)

if reply.code == pyrad.packet.AccessAccept:
    print("access accepted")
else:
    print("access denied")

print("Attributes returned by server:")
for key, val in reply.items():
    print(f"{key}: {val}")

Requirements & Installation

pyrad requires Python 3.8 or later

Installing is simple; pyrad uses the standard distutils system for installing Python modules:

python setup.py install

Release files for pyrad 2.5.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrad 2.5.4
File Size Uploaded
pyrad-2.5.4.tar.gz 488.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyrad 2.5.4
File Interpreter ABI Platform
pyrad-2.5.4-py3-none-any.whl Python 3 none any Details

Total release size: 983.4 kB

Release files / pyrad-2.5.4.tar.gz

Download URL pyrad-2.5.4.tar.gz
Size 488.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e039c48a026c988d49276bd7c75795f55e0e4c2788f7ddf09419ce0e191a154d
BLAKE2b-256 checksum
How to use checksums
5275b3e18567376dd4f6d0a9d4b283cf4b16dd31420815a9e52bdd0282280777
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / pyrad-2.5.4-py3-none-any.whl

Download URL pyrad-2.5.4-py3-none-any.whl
Size 495.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c75e8a5642df262071d631e4552e08d9d5bed0c62699d83c24105c4fbfc2cff
BLAKE2b-256 checksum
How to use checksums
19545b0ded99e5a8390be3e5c29513b9f53c01e5741256b7f73a20c0c606f29d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

2.5.4 This release

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4

2 release files

2.3

2 release files

2.2

2 release files

2.1

2 release files

2.0

2 release files

1.2

1 release file

1.1

2 release files

1.0

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