by pyradius

pyradius / pyrad

Python RADIUS Implementation

209 Stars 138 Forks Last release: 9 months ago (2.3) BSD 3-Clause "New" or "Revised" License 310 Commits 11 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

.. image:: :target: .. image:: :target: .. image:: :target: .. image:: :target: .. image:: :target: .. image:: :target: :alt: Documentation Status .. image:: :target:


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 __future__ import print_function
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 i in reply.keys(): print("%s: %s" % (i, reply[i]))

Requirements & Installation

pyrad requires Python 2.7, or Python 3.4 or later

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

python install

Author, Copyright, Availability

pyrad was written by Wichert Akkerman [email protected] and is maintained by Christian Giese (GIC-de) and Istvan Ruzman (Istvan91).

This project is licensed under a BSD license.

Copyright and license information can be found in the LICENSE.txt file.

The current version and documentation can be found on pypi:

Bugs and wishes can be submitted in the pyrad issue tracker on github:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.