Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Python RADIUS implementation
Latest commit b73bee9 @wichert Merge pull request #18 from npmccallum/master
Correct an assumption that '' is an invalid secret.
Failed to load latest commit information.
docs More doc tweaks
example Standardize on 4 spaces for indenting
CHANGES.txt Use a better random generator.
LICENSE.txt Make sure all encoding utility methods raise a TypeError if a value o… Put pyrad in place
README.rst More doc tweaks
TODO.txt Another TODO
index.txt That did not quite work...
setup.cfg Use a newer nose release Switch homepage url



pyrad is an implementation of a RADIUS client 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:

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

srv=Client(server="", secret="s3cr3t",
      dict=Dictionary("dicts/dictionary", "dictionary.acc"))

              User_Name="wichert", NAS_Identifier="localhost")

if reply.code==pyrad.packet.AccessAccept:
    print "access accepted"
    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.6 or later, or Python 3.2 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 <> and 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:

Something went wrong with that request. Please try again.