Skip to main content

RADIUS tools

Project description

https://github.com/pyradius/pyrad/actions/workflows/python-test.yml/badge.svg?branch=master https://coveralls.io/repos/github/pyradius/pyrad/badge.svg?branch=master https://img.shields.io/pypi/v/pyrad.svg https://img.shields.io/pypi/pyversions/pyrad.svg https://img.shields.io/pypi/dm/pyrad.svg Documentation Status https://img.shields.io/pypi/l/pyrad.svg https://img.shields.io/badge/Chat-darkgreen

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 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 3.8 or later

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

python setup.py install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrad-2.5.1.tar.gz (60.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrad-2.5.1-py3-none-any.whl (69.4 kB view details)

Uploaded Python 3

File details

Details for the file pyrad-2.5.1.tar.gz.

File metadata

  • Download URL: pyrad-2.5.1.tar.gz
  • Upload date:
  • Size: 60.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pyrad-2.5.1.tar.gz
Algorithm Hash digest
SHA256 b7748f75b11c0c094655751221cbb75148db555a37fe263c24560d25b9d41009
MD5 aeb4ad2ae70f65082318d83b00ae9728
BLAKE2b-256 4fe44ad586c0e63175928a0568f12288423a1e1d55de9ec62d4f1a853326b583

See more details on using hashes here.

File details

Details for the file pyrad-2.5.1-py3-none-any.whl.

File metadata

  • Download URL: pyrad-2.5.1-py3-none-any.whl
  • Upload date:
  • Size: 69.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pyrad-2.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 35537ca424bc56eef0bb4618e3da4228b6f9e1d9db1a34df16d6c3b9185f825b
MD5 ffdad712a4b6a9bfb205904bbd30e742
BLAKE2b-256 081515a1da3da5f67f0bda50847e02845ed65f7b899cc796abdff73aa6ec7227

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page