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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrad-2.2.tar.gz
  • Upload date:
  • Size: 43.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for pyrad-2.2.tar.gz
Algorithm Hash digest
SHA256 543788b4565faac9453eebc7c1c806a00c03b6d495874b4fda454c5b2f979726
MD5 d3f3f403a3acc39b1d96bd6edb4b66cc
BLAKE2b-256 ff78b6e9f960715f1dc123c4c9a7b58372bc6dc8858468e96109c77c3110b0fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrad-2.2-py3-none-any.whl
  • Upload date:
  • Size: 44.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for pyrad-2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 579b52e0c4cfb54b64f96ac45dd707058a76faa24612b56bbf64a5e25d368a03
MD5 3d29894eb75d1fe952da082d51a55790
BLAKE2b-256 18ab4ad999af29a7a19f201ed3dfe47d0fa9f9a170b414c217f09ed603dbf550

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