Debian Codegraph @

docs/source/index.rst

raw
1
2 *********************************
3 :mod:`pyrad` -- RADIUS for Python
4 *********************************
5
6 :Author: Christian Giese (GIC-de), Istvan Ruzman (Istvan91) and Stefan Lieberth (slieberth)
7 :Version: |version|
8
9 Introduction
10 ============
11
12 pyrad is an implementation of a RADIUS client/server as described in RFC2865.
13 It takes care of all the details like building RADIUS packets, sending
14 them and decoding responses.
15
16 Here is an example of doing a authentication request::
17
18 from pyrad.client import Client
19 from pyrad.dictionary import Dictionary
20 import pyrad.packet
21
22 srv = Client(server="localhost", secret=b"Kah3choteereethiejeimaeziecumi",
23 dict=Dictionary("dictionary"))
24
25 # create request
26 req = srv.CreateAuthPacket(code=pyrad.packet.AccessRequest,
27 User_Name="wichert", NAS_Identifier="localhost")
28 req["User-Password"] = req.PwCrypt("password")
29
30 # send request
31 reply = srv.SendPacket(req)
32
33 if reply.code == pyrad.packet.AccessAccept:
34 print("access accepted")
35 else:
36 print("access denied")
37
38 print("Attributes returned by server:")
39 for i in reply.keys():
40 print("%s: %s" % (i, reply[i]))
41
42
43 Requirements & Installation
44 ===========================
45
46 pyrad requires Python 3.8 or later
47
48 Installing is simple; pyrad uses the standard distutils system for installing
49 Python modules::
50
51 python setup.py install
52
53 Author, Copyright, Availability
54 ===============================
55
56 pyrad was written by Wichert Akkerman <[email protected]> and is maintained by
57 Christian Giese (GIC-de), Istvan Ruzman (Istvan91) and Stefan Lieberth (slieberth).
58
59 We’re looking for contributors to support the pyrad team! If you’re interested in
60 helping with development, testing, documentation, or other areas, please contact
61 us directly.
62
63 This project is licensed under a BSD license.
64
65 Copyright and license information can be found in the LICENSE.txt file.
66
67 The current version and documentation can be found on pypi:
68 https://pypi.org/project/pyrad/
69
70 Bugs and wishes can be submitted in the pyrad issue tracker on github:
71 https://github.com/pyradius/pyrad/issues
72
73 Related Projects & Forks
74 ========================
75
76 **pyrad2:** Noteworthy fork with experimental RadSec (RFC 6614) support. Targets Python 3.12+,
77 adds extensive type hints, boosts test coverage, and includes fresh bug fixes.
78 https://github.com/nicholasamorim/pyrad2
79
80 **pyrad-server:** Lab-grade RADIUS test server built on top of pyrad.
81 https://github.com/slieberth/pyrad-server
82
83 API Documentation
84 =================
85
86 Per-module :mod:`pyrad` API documentation.
87
88 .. toctree::
89 :maxdepth: 2
90
91 api/client
92 api/dictionary
93 api/host
94 api/packet
95 api/proxy
96 api/server
97
98
99 Indices and tables
100 ==================
101
102 * :ref:`genindex`
103 * :ref:`modindex`
104 * :ref:`search`