Skip to main content

RADIUS tools

Project description

https://travis-ci.org/pyradius/pyrad.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

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

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.3.tar.gz (46.4 kB view details)

Uploaded Source

Built Distribution

pyrad-2.3-py3-none-any.whl (44.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrad-2.3.tar.gz
  • Upload date:
  • Size: 46.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pyrad-2.3.tar.gz
Algorithm Hash digest
SHA256 89c4d9b2cab1746c48dc0d93898d278e34a40acedf6f511aeaa748bcd4490295
MD5 f19d2facd33c98c90ce0cc4d839add2a
BLAKE2b-256 83b84ab5e0c169635410b316085a2ccd41ac6bcb16f90706bfc003095a60d9e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrad-2.3-py3-none-any.whl
  • Upload date:
  • Size: 44.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pyrad-2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2f5a8955b8be1b0b7a91e6363b5faebba1e862b38efb7ecf6f5820788293f55d
MD5 c66022d11f36a994f31cb5d2ffd98a98
BLAKE2b-256 0ac8d920ee82221503d99e7b51c62e52fd80e034b5f8e69c6a7e084a2ca6b380

See more details on using hashes here.

Supported by

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