Install & Compatibility
Where this runs
tested against v1.7.2 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.632s · 32.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.7s · import 0.590s · 33MB
31MB installed
● package 31MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CASClient
✓ from cas import CASClient
✗ from casclient import CASClient
Module name is 'cas', not 'casclient'
CASClientV2
✓ from cas import CASClientV2
CASClientV3
✓ from cas import CASClientV3
Basic CAS client setup and ticket verification.
from cas import CASClient
client = CASClient(
version=3,
service_url='https://myapp.example.com/login',
server_url='https://cas.example.com/cas/',
verify_ssl_certificate=True
)
# If you have a ticket from the CAS server:
ticket = request.GET.get('ticket')
if ticket:
user, attributes, pgtiou = client.verify_ticket(ticket)
print(f"Authenticated user: {user}")
Errors
Common errors & fixes
ImportError: No module named 'cas'
Package not installed.
fixpip install python-cas
ModuleNotFoundError: No module named 'casclient'
Wrong import path.
fixUse 'from cas import CASClient' instead.
python-cas requires Python '>=3.10' but the running Python is 3.8
Using too old Python version.
fixUpgrade Python to 3.10 or higher, or install an older version of python-cas (e.g., 1.6.0).
AttributeError: module 'cas' has no attribute 'CASClientV2'
Older version of python-cas (<1.1.0) may not have V2.
fixUpgrade to latest version (>=1.1.0).
Upgrade
Version history
1.7.2latest on PyPI · released May 5, 2026
Audit
Dependencies
requestsrequiredUsed for all HTTP communication with CAS server
lxmloptionalOptional, required for SAML responses parsing