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 __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 setup.py install
Metadata
Release files for pyrad 2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyrad-2.3.tar.gz | 46.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyrad-2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.4 kB
Release files / pyrad-2.3.tar.gz
| Download URL | pyrad-2.3.tar.gz |
|---|---|
| Size | 46.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89c4d9b2cab1746c48dc0d93898d278e34a40acedf6f511aeaa748bcd4490295
|
|
BLAKE2b-256 checksum How to use checksums |
83b84ab5e0c169635410b316085a2ccd41ac6bcb16f90706bfc003095a60d9e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
|
Release files / pyrad-2.3-py3-none-any.whl
| Download URL | pyrad-2.3-py3-none-any.whl |
|---|---|
| Size | 44.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f5a8955b8be1b0b7a91e6363b5faebba1e862b38efb7ecf6f5820788293f55d
|
|
BLAKE2b-256 checksum How to use checksums |
0ac8d920ee82221503d99e7b51c62e52fd80e034b5f8e69c6a7e084a2ca6b380
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
|