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.0.tar.gz (48.6 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.0-py3-none-any.whl (40.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyrad2-2.0.tar.gz
Algorithm Hash digest
SHA256 b80b22233677ae20f5efc73797519403edbe12b42ffca71d11a1169ae29cbfd7
MD5 d2e7f6ba73d1cc6f8dd2054d8249334f
BLAKE2b-256 0a5394602b7e82b60c27d0822aae403b5cd9768acdb0d8bed121c3f6d2e62bc8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyrad2-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e78c887fd0b7851346d44914544e351309bb179a7448b0966764ac0b6c760e59
MD5 55b432a66020c395fbbfecaef2b9a468
BLAKE2b-256 b270f81b0debefb65978317950857f98429a76c10e7090763426a0161f58b935

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