Alive Verify Python
Unofficial Python client for the Alive Verify API. (focused on ISIC - International Student Identity Card)
The library provides a simple interface for card verification, partner information and transaction reporting using the Alive Verify REST API.
Installation
pip install alive-verify
Authentication
Alive Verify uses HTTP Basic Authentication.¨
from alive_verify import AliveVerifyClient
client = AliveVerifyClient(
username="your-username",
password="your-password",
environment="test",
)
Available environments:
- test
- production
Get partner information
partner = client.get_partner()
print(partner.name)
print(partner.currency)
for discount in partner.discounts:
print(discount.id, discount.name)
Card verification
By cardholder
verification = client.verify_by_cardholder(
card_number="S...",
cardholder_name="John Doe",
discount_id=12345,
)
if verification.successful:
print("Card verified")
else:
print(verification.reason)
By card number
verification = client.verify_by_number(
card_number="S...",
discount_id=12345,
)
By RFID chip
verification = client.verify_by_chip(
chip_number="EB16CF53",
discount_id=12345,
)
By phone number
verification = client.verify_by_phone(
cardholder_phone="+420606912554",
discount_id=12345,
)
Availability of verification modes depends on permissions assigned to your Alive Verify API account.
Transactions
from datetime import datetime
transaction = client.create_receipt(
discount_id=12345,
verification_id=verification.id,
issued_on=datetime.now().astimezone(),
amount_paid=100.0,
)
Revoke a transaction:
client.revoke_receipt(transaction.id)
Error handling
from alive_verify import (
AliveAuthenticationError,
AliveForbiddenError,
AliveValidationError,
)
try:
verification = client.verify_by_number(
card_number="S...",
)
except AliveForbiddenError as error:
print(error)
Development
Install development dependencies:
pip install -e ".[dev]"
Run unit tests:
pytest -v
Integration tests are disabled by default because they call the real Alive Verify test API.To enable them in PowerShell:
$env:ALIVE_VERIFY_RUN_INTEGRATION="1"
pytest -v tests\integration
Credentials are loaded from .env:
ALIVE_VERIFY_USERNAME=...
ALIVE_VERIFY_PASSWORD=...
ALIVE_VERIFY_TEST_CARD_NUMBER=...
ALIVE_VERIFY_TEST_CARDHOLDER_NAME=...
ALIVE_VERIFY_TEST_DISCOUNT_ID=...
Release files for alive-verify 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| alive_verify-0.1.0.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alive_verify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.7 kB
Release files / alive_verify-0.1.0.tar.gz
| Download URL | alive_verify-0.1.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13b31fb2d52184acf0164a2e9eaaf1ef233754f638577cd0fbdc0d2b28029346
|
|
BLAKE2b-256 checksum How to use checksums |
0b50050a5dfb1e46e620326a42b62bfc44d5f93f34da8d8c95e33e143096530a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logRelease files / alive_verify-0.1.0-py3-none-any.whl
| Download URL | alive_verify-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f156d5e29d8ee817ca542815730c3bd7bce5cf4111478bbd46cd75f45698d94
|
|
BLAKE2b-256 checksum How to use checksums |
967feb03de19a6e7ddca50116d882149a850c0cf16cd2eacb635c10d25d6427a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency log