Registry / auth-security / tacacs-plus

tacacs-plus

JSON →
library2.6pypypi✓ verified 85d ago

A client library for TACACS+ authentication. Provides both a low-level network client and a high-level authentication/authorization/accounting interface. Current version 2.6, maintained by the Ansible community. Release cadence is irregular.

pip install tacacs-plus
INSTALL
IMPORT
SIG · TACACS-PLUS
T
tacacs-plus
auth-securitypythonv2.6
Install
1.6s avg
Import
45ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.048s · 18MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.042s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TACACSClient
from tacacs_plus.client import TACACSClient
Primary high-level client class.
Session
from tacacs_plus.session import Session
Low-level session handling.
Flags
from tacacs_plus.flags import *
TACACS+ protocol flags (e.g., TAC_PLUS_AUTHEN_TYPE_ASCII).

Basic TACACS+ authentication example.

from tacacs_plus.client import TACACSClient client = TACACSClient( host='tacacs.example.com', port=49, secret='shared_secret', timeout=5 ) authenticated = client.authenticate( username='admin', password='supersecret', authen_type=1 # ASCII ) print('Authenticated:', authenticated)
Debug
Known issues
breakingIn version 2.0, the package name changed from 'tacacs' to 'tacacs-plus'. The import path also changed; you must now import from 'tacacs_plus'.
fix
Replace 'import tacacs' with 'from tacacs_plus import ...'.
affects: <2.0 vs >=2.0
gotchaThe secret parameter is mandatory and must be a string, not bytes. Passing bytes results in a TypeError.
fix
Ensure secret is a str (e.g., secret='mysecret').
affects: all
gotchaThe timeout parameter is in seconds but may be ignored on some platforms (e.g., Windows) due to socket timeout limitations.
fix
Test timeout behavior on your target platform; use a small default (e.g., 5 seconds).
affects: all
deprecatedPython 2.7 support is deprecated and will be removed in a future release.
fix
Upgrade to Python 3.
affects: >=2.5
Errors
Common errors & fixes
tacacs_plus.client.TACACSClient.authenticate() got an unexpected keyword argument 'timeout'
The 'timeout' argument was added in version 2.3; older versions do not accept it.
fix
Upgrade to version 2.3 or later: pip install --upgrade tacacs-plus
AttributeError: module 'tacacs_plus' has no attribute 'TACACSClient'
Wrong import path: users try to import TACACSClient directly from top-level module.
fix
Use correct import: from tacacs_plus.client import TACACSClient
TypeError: a bytes-like object is required, not 'str'
In Python 3, passing a string where bytes are expected (e.g., secret).
fix
Ensure secret is a string; if you must use bytes, encode it properly: secret=b'secret'.decode() or use str.
Upgrade
Version history
2.6latest on PyPI · released Aug 20, 2018
Audit
Dependencies
sixrequiredUsed for Python 2/3 compatibility.
Agent activity
34 hits · last 30 days
node
30
OpenAI (training)
1
Resources
tacacs-plus — pip install tacacs-plus · libregistry