References#
Django Settings#
The following Django settings can be used to configure the learning-credentials service:
Setting |
Default |
Description |
|---|---|---|
|
|
Directory (prefix) in Django default storage where generated credential PDFs are saved. Invalidated credentials are stored in |
|
|
If set, credential download URLs will use this domain instead of the storage backend’s URL. Format: |
|
|
Convert the learner’s name to uppercase by default on PDF credentials. |
|
|
Convert the issue date to uppercase by default on PDF credentials. |
|
|
Default character spacing (in points) for the date text element on PDF credentials. |
|
(from Open edX) |
The date format string used for localizing the credential issue date. |
|
(from Open edX) |
The platform name included in credential notification emails. |
REST API Endpoints#
All endpoints are under /api/learning_credentials/v1/.
Check Credential Configuration#
GET /api/learning_credentials/v1/configured/<learning_context_key>/
Check whether credentials are configured for a given learning context (course or Learning Path). Requires authentication and access to the learning context.
Response (200 OK):
{
"is_configured": true,
"credential_types": ["Certificate of Completion"]
}
Credential Metadata (Verification)#
GET /api/learning_credentials/v1/metadata/<verify_uuid>/
Retrieve credential metadata by its verification UUID. This is a public endpoint (no authentication required) intended for third-party verification.
Response (200 OK):
{
"user_full_name": "John Doe",
"created": "2026-01-15T10:30:00Z",
"learning_context_name": "Introduction to Computer Science",
"status": "available",
"invalidation_reason": ""
}
Response (404 Not Found):
{
"error": "Credential not found."
}
Development Commands#
This project uses mise for development task management.
Command |
Description |
|---|---|
|
Install development dependencies using uv |
|
Run tests with pytest |
|
Run code quality checks (ruff, yamllint) |
|
Run tests, quality checks, and PII compliance checks |
|
Format and lint files with ruff (auto-fix mode) |
|
Run tests across all tox environments (Python 3.11/3.12, Django 4.2/5.2) |
|
Generate HTML coverage report and open in browser |
|
Find diff lines needing test coverage |
|
Check PII annotations on Django models |
|
Generate Sphinx documentation and open in browser |
|
Remove generated artifacts and coverage reports |
|
Update uv.lock with latest package versions |
|
Extract translatable strings |
|
Compile translation files |
|
Pull translations from Transifex |
|
Push source translation files to Transifex |