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.2.tar.gz (488.5 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.2-py3-none-any.whl (495.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrad-2.5.2.tar.gz
  • Upload date:
  • Size: 488.5 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.2.tar.gz
Algorithm Hash digest
SHA256 368e8d3cb7b9e2ca9e4357b343787238bf135edd3f3598cf26ccd65d32506ff9
MD5 07c75363e520e4843645cd17c08e6586
BLAKE2b-256 0c62ffa819f420e1d5130df73b262443052a5a686d67521b899b142ba333b96f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrad-2.5.2-py3-none-any.whl
  • Upload date:
  • Size: 495.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f055e9c7e500aa3423c2e9ea03c04ba676694acaf8b81d4fd51f0a6fbbc2b1cb
MD5 d4f12505d9455878b3a15ea81b2025e8
BLAKE2b-256 2fed8ac16344400e3b72b5e29f5ded4aac4adc1d10bf6396d8a6f47b6395c0d1

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