Skip to main content

RADIUS Server

Project description

Tests python pre-commit Code style: ruff Checked with mypy

pyrad2 is an implementation of a RADIUS client/server as described in RFC2865 and of RADSEC client/server as described in RFC6614. It takes care of all the details like building RADIUS packets,sending them and decoding responses.

Documentation can be found here.

Introduction

pyrad2 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.

What this fork does:

  • Adds RadSec (RFC 6614) support (Experimental)
  • Supports only Python 3.12+
  • Extensive typing
  • Increased test coverage
  • New bug fixes

Note that this is not a stand-alone Radius implementation like FreeRadius. You are supposed to inherit the server classes and code your own behind-the-scenes implementation. This package allows you to code your business logic on top of it.

Requirements & Installation

pyrad2 requires Python 3.12 and uses uv. On a Mac, you can simply run brew install uv.

Examples

See the Getting Started guide for a better overview.

There are a few examples in the examples folder. You can either install pyrad2 and use the examples or clone the repo. If you clone the repo, make commands are useful.

The easiest way to start a server is by running make server. This will run the example server in examples/server_async.py.

If you want to see a request in action, leave the server running, open another terminal and type make auth. Several other commands are available such as make server_radsec, make server_coa, make_acct, etc.

Tests

Run make test.

Author, Copyright, Availability

pyrad2 is currently maintaned by Nicholas Amorim <<nicholas@santos.ee>.

pyrad was written by Wichert Akkerman <wichert@wiggy.net> and is maintained by Christian Giese (GIC-de) and Istvan Ruzman (Istvan91).

This project is licensed under a BSD license.

Copyright and license information can be found in the LICENSE.txt file.

The current version and documentation can be found on pypi: https://pypi.org/project/pyrad2/

Bugs and wishes can be submitted in the pyrad issue tracker on github: https://github.com/nicholasamorim/pyrad2/issues

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

pyrad2-2.1.tar.gz (65.0 kB view details)

Uploaded Source

Built Distribution

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

pyrad2-2.1-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

File details

Details for the file pyrad2-2.1.tar.gz.

File metadata

  • Download URL: pyrad2-2.1.tar.gz
  • Upload date:
  • Size: 65.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for pyrad2-2.1.tar.gz
Algorithm Hash digest
SHA256 21781971492c0cdfcb6bbf8ee7c02878b78434fb7234e83da9eef347d7f3b43b
MD5 74cdb354a9977bbb8d46903b6e779a05
BLAKE2b-256 9ace30a452f6f2ec5defc5634341953837a062ff394ea16df66cf9e4a20d3bfb

See more details on using hashes here.

File details

Details for the file pyrad2-2.1-py3-none-any.whl.

File metadata

  • Download URL: pyrad2-2.1-py3-none-any.whl
  • Upload date:
  • Size: 50.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for pyrad2-2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6f4357fe3aaba49e66318c8110d41982439aae123ca1125eea1e7d69cd9891a2
MD5 a8afcf91393e4b8ce1fb70a64149897f
BLAKE2b-256 915a657d6ff594c7acb09f64c48642546e5fa5fea618dd4eb447d98bb902f7ff

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