Registry / auth-security / python-cas

python-cas

JSON →
library1.7.2pypypi✓ verified 89d ago

Python CAS client library for integrating with CAS (Central Authentication Service) single sign-on servers. Current version 1.7.1, supports Python >=3.10. Release cadence is sporadic.

pip install python-cas
INSTALL
IMPORT
SIG · PYTHON-CAS
P
python-cas
auth-securitypythonv1.7.2
Install
2.7s avg
Import
611ms
Disk
31MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
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
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.632s · 32.9MB
glibc
py 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}")
Debug
Known issues
breakingIn v1.7.0, support for Python <3.10 was dropped. Also the dependency on 'six' was removed, which may affect code relying on six.
fix
Upgrade to Python >=3.10. Replace any six usage with native Python 3 equivalents.
affects: >=1.7.0
deprecatedCASClientV1 is deprecated and may be removed in a future version. Use CASClient with version=3 instead.
fix
Use CASClient with version=2 or 3.
affects: all
gotchaThe 'verify_ssl_certificate' parameter is available since v1.4.0. In older versions SSL verification is always enabled.
fix
Upgrade to v1.4.0+ or use requests session with custom verify.
affects: <1.4.0
gotchaThe client uses requests.Session, which holds cookies. Reuse the client instance for multiple requests to maintain session state.
fix
Create one CASClient instance and reuse it.
affects: >=1.6.0
Errors
Common errors & fixes
ImportError: No module named 'cas'
Package not installed.
fix
pip install python-cas
ModuleNotFoundError: No module named 'casclient'
Wrong import path.
fix
Use 'from cas import CASClient' instead.
python-cas requires Python '>=3.10' but the running Python is 3.8
Using too old Python version.
fix
Upgrade 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.
fix
Upgrade 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
Agent activity
24 hits · last 30 days
node
20
OpenAI (training)
1
Resources
python-cas — pip install python-cas · libregistry