pyrad is a Python RADIUS client.
pyrad contains several modules:
RADIUS client class.
RADIUS dictionary support. Supports standard radiusd dictionaries and has preliminary support for the freeradius octets and abinary extensions.
A packet with a RADIUS request or reply. A packet object takes care of all the necessary data conversion allowing the programmer to only use standard python data types and RADIUS attribute names.
Basic RADIUS server and proxy classes.
Utility functions, mostly used internally for data conversion
Below is a simple example of how to use pyrad; it shows how to do an authentication request.
from pyrad.client import Client
from pyrad.dictionary import Dictionary
print "access accepted"
print "access denied"
print "Attributes returned by server:"
for i in reply.keys():
print "%s: %s" % (i, reply[i])
What's New in This Release:
· The Packet class has been improved to behave fully like a standard Python dictionary.
· This release no longer assumes that unknown attribute types do not need any decoding or encoding, which could cause invalid packets to be generated.
· Support has been added for the 'octets' data type as used by FreeRADIUS.