2020-08-07 16:39:17 +02:00
2020-07-02 16:01:29 +02:00
2020-08-06 18:04:24 +02:00
2020-08-07 16:39:17 +02:00
2020-08-06 18:04:24 +02:00
2020-08-06 18:07:09 +02:00
2020-08-06 18:07:09 +02:00
2020-07-02 16:01:29 +02:00
2020-08-06 18:04:24 +02:00
2020-07-02 16:01:29 +02:00
2020-07-02 16:01:29 +02:00
2020-07-02 16:01:29 +02:00
2020-08-06 18:04:24 +02:00
2020-07-02 16:01:29 +02:00
2020-08-06 18:04:24 +02:00

Introduction

pyrad3 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.

This is the successor of pyrad. It is written in python3 only (python3.6+) and has an improved API.

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, values in reply.items():
    print("{key}: {value}")

Requirements & Installation

pyrad requires Python 3.6 or later.

# Install from the repository
pip install .
# Install from pypi
pip install pyrad3

License

pyrad3 is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE LICENSE-MIT and COPYRIGHT for details.

Description
No description provided
Readme 301 KiB
Languages
Python 98.4%
Nix 1.6%