Skip to main content

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_ID
  • TIMEBACK_CLIENT_SECRET
  • TIMEBACK_ENVIRONMENT in {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
  • staging
    • OneRoster: https://api.staging.alpha-1edtech.ai/
    • QTI: https://qti-staging.alpha-1edtech.ai/api
    • Caliper: https://caliper-staging.alpha-1edtech.ai

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",
)

# Raw HTTP clients (services can be added later)
qti_health = client.qti_http.get("/health")
caliper_status = client.caliper_http.get("/status")

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.md
  • timeback/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

timeback-0.1.4.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timeback-0.1.4-py3-none-any.whl (103.3 kB view details)

Uploaded Python 3

File details

Details for the file timeback-0.1.4.tar.gz.

File metadata

  • Download URL: timeback-0.1.4.tar.gz
  • Upload date:
  • Size: 48.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

Hashes for timeback-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6348ae0808f3c9dcd0dfafa1da5ee973535c5e0b2da7cd89a5070eb7bb8b737a
MD5 e6fe1ab8f93c21e6d39ebd0236422485
BLAKE2b-256 2b98416efdbbf12ba918ac0ba88d5a6f33906436b85ed70392fa7988d5e54db0

See more details on using hashes here.

File details

Details for the file timeback-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: timeback-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 103.3 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

Hashes for timeback-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3ef304053b5cdf11f032f00b357cc5578d7c217ed2ab0509d7b3fcd5e8f34da7
MD5 cfa6ddbcff475b0b7a14fe46acf457a9
BLAKE2b-256 8141a0b5ced976abc8e497dbd2fc2a0195a9afeda883aab03f3162af696f8319

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page