{"id":22433,"library":"tacacs-plus","title":"tacacs-plus","description":"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.","status":"active","version":"2.6","language":"python","source_language":"en","source_url":"https://github.com/ansible/tacacs_plus","tags":["tacacs","authentication","network","ansible"],"install":[{"cmd":"pip install tacacs-plus","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Used for Python 2/3 compatibility.","package":"six","optional":false}],"imports":[{"note":"Primary high-level client class.","symbol":"TACACSClient","correct":"from tacacs_plus.client import TACACSClient"},{"note":"Low-level session handling.","symbol":"Session","correct":"from tacacs_plus.session import Session"},{"note":"TACACS+ protocol flags (e.g., TAC_PLUS_AUTHEN_TYPE_ASCII).","symbol":"Flags","correct":"from tacacs_plus.flags import *"}],"quickstart":{"code":"from tacacs_plus.client import TACACSClient\n\nclient = TACACSClient(\n    host='tacacs.example.com',\n    port=49,\n    secret='shared_secret',\n    timeout=5\n)\nauthenticated = client.authenticate(\n    username='admin',\n    password='supersecret',\n    authen_type=1  # ASCII\n)\nprint('Authenticated:', authenticated)","lang":"python","description":"Basic TACACS+ authentication example."},"warnings":[{"fix":"Replace 'import tacacs' with 'from tacacs_plus import ...'.","message":"In version 2.0, the package name changed from 'tacacs' to 'tacacs-plus'. The import path also changed; you must now import from 'tacacs_plus'.","severity":"breaking","affected_versions":"<2.0 vs >=2.0"},{"fix":"Ensure secret is a str (e.g., secret='mysecret').","message":"The secret parameter is mandatory and must be a string, not bytes. Passing bytes results in a TypeError.","severity":"gotcha","affected_versions":"all"},{"fix":"Test timeout behavior on your target platform; use a small default (e.g., 5 seconds).","message":"The timeout parameter is in seconds but may be ignored on some platforms (e.g., Windows) due to socket timeout limitations.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Python 3.","message":"Python 2.7 support is deprecated and will be removed in a future release.","severity":"deprecated","affected_versions":">=2.5"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Upgrade to version 2.3 or later: pip install --upgrade tacacs-plus","cause":"The 'timeout' argument was added in version 2.3; older versions do not accept it.","error":"tacacs_plus.client.TACACSClient.authenticate() got an unexpected keyword argument 'timeout'"},{"fix":"Use correct import: from tacacs_plus.client import TACACSClient","cause":"Wrong import path: users try to import TACACSClient directly from top-level module.","error":"AttributeError: module 'tacacs_plus' has no attribute 'TACACSClient'"},{"fix":"Ensure secret is a string; if you must use bytes, encode it properly: secret=b'secret'.decode() or use str.","cause":"In Python 3, passing a string where bytes are expected (e.g., secret).","error":"TypeError: a bytes-like object is required, not 'str'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}