A Python client for the TimeBack API (OneRoster 1.2 implementation)
Project description
Timeback
Python client for the Timeback API (OneRoster 1.2 plus adjacent services).
Installation
Using Poetry (recommended)
poetry install
poetry shell
From built wheel
poetry build
pip install dist/timeback-0.1.0-py3-none-any.whl
Configuration
Required environment variables:
TIMEBACK_CLIENT_IDTIMEBACK_CLIENT_SECRETTIMEBACK_ENVIRONMENTin {production,staging}
Optional per-service base URL overrides:
TIMEBACK_QTI_API_BASE_URL(defaults by environment)TIMEBACK_CALIPER_API_BASE_URL(defaults by environment)
Defaults by environment:
- production
- OneRoster:
https://api.alpha-1edtech.ai/ - QTI:
https://qti.alpha-1edtech.ai/api - Caliper:
https://caliper.alpha-1edtech.ai
- OneRoster:
- staging
- OneRoster:
https://api.staging.alpha-1edtech.ai/ - QTI:
https://qti-staging.alpha-1edtech.ai/api - Caliper:
https://caliper-staging.alpha-1edtech.ai
- OneRoster:
Quick start
from timeback import Timeback
client = Timeback()
user = client.oneroster.rostering.get_user("<sourcedId>")
print(user.sourcedId, user.givenName, user.familyName)
Override QTI/Caliper base URLs explicitly:
client = Timeback(
environment="staging",
qti_api_base_url="https://my-qti.example.com/api",
caliper_api_base_url="https://my-caliper.example.com",
)
# Access different services
user = client.oneroster.rostering.get_user(request)
# client.powerpath.get_all_placement_tests(request) # when implemented
# client.qti.search_assessment_items(request) # when implemented
# client.caliper.create_caliper_event(request) # when implemented
Design rules: service methods contain no business logic; each method calls a single endpoint function in timeback/services/.../endpoints/, which may import utilities from .../utils/. All endpoints/utilities return typed Pydantic models/enums from timeback/models and timeback/enums.
See docs for structure and procedures:
timeback/docs/oneroster/rostering/get_user.mdtimeback/docs/oneroster/rostering/get_all_users.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file timeback-0.3.0.tar.gz.
File metadata
- Download URL: timeback-0.3.0.tar.gz
- Upload date:
- Size: 195.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81b07886d9b394593d90eabd2e48fdb3844bb5beb0635b5fe47340855eb1a5a6
|
|
| MD5 |
8d2c3f38f1be552280c40e13b123f425
|
|
| BLAKE2b-256 |
5e4a979ce1aafcaf71564d3a2e7ef501555309a84e06817ec9b53693c3888422
|
File details
Details for the file timeback-0.3.0-py3-none-any.whl.
File metadata
- Download URL: timeback-0.3.0-py3-none-any.whl
- Upload date:
- Size: 603.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b7a92c3333016b0dc76a6c11f9bea6c324ddaf85e8fa1c2c167a96aa57c692a
|
|
| MD5 |
60e97eb085f1a5dbff183e14d0950fbf
|
|
| BLAKE2b-256 |
d6ac25ae39d0895f588f8d5bfebe33afb65b3a01224f3bf2d95627c424b66797
|