Skip to main content

Trakt System SDK

Client libraries for the Trakt System Integrations API: fleet predictions and maintenance forecasts, in a few lines of code.

Trakt System predicts which components on your fleet need attention, when, and what to do about them. This SDK gives you that data directly, with authentication, retries, and rate limits handled for you.

Full endpoint reference, including request and response schemas for every route: https://trakt.tech/api-documentation

Install

Python

pip install kquika-trakt              # core
pip install "kquika-trakt[pandas]"    # with DataFrame support

The distribution is named kquika-trakt and the import is trakt. That difference is normal: the package you install and the module you import do not have to share a name.

Node / TypeScript

npm install @kquika-inc/trakt

Requires Node 18 or newer. TypeScript types are included.

Quickstart

Python

from trakt import Trakt

trakt = Trakt(token="YOUR_API_KEY")   # or set TRAKT_TOKEN

# What can this token do?
cfg = trakt.config()
print(cfg.access_level, cfg.max_predictions, cfg.can_export)

# Per-component predictions, most urgent first
for c in trakt.components():
    print(c.name, c.aircraft_tail_number, c.health,
          c.failure_probability, c.recommended_action)

# The next 90 days of maintenance, soonest first
for item in trakt.forecast(days=90):
    if item.is_overdue:
        print("OVERDUE:", item.tail_number, item.component_name)

# Straight to a DataFrame for planning
df = trakt.components_dataframe()

# Fleet-level rollup that matches the dashboards: health, composite average
# confidence, prediction coverage, and 30-day survival
summary = trakt.fleet_summary()
print(summary.fleet_health, summary.avg_confidence, summary.survival_30d)

Node / TypeScript

import { Trakt } from "@kquika-inc/trakt";

const trakt = new Trakt({ token: process.env.TRAKT_TOKEN! });

const cfg = await trakt.config();
console.log(cfg.access_level, cfg.max_predictions);

// Per-component predictions, most urgent first
const components = await trakt.components();
for (const c of components) {
  console.log(c.name, c.aircraft_tail_number, c.health, c.recommended_action);
}

// The next 90 days of maintenance, soonest first
const forecast = await trakt.forecast({ days: 90 });
for (const item of forecast) {
  if (item.is_overdue) console.log("OVERDUE:", item.tail_number, item.component_name);
}

// Fleet-level rollup that matches the dashboards
const summary = await trakt.fleetSummary();
console.log(summary.fleet_health, summary.avg_confidence, summary.survival_30d);

Full endpoint coverage

Both clients cover every token-callable endpoint. The table maps each method to the route it calls, so a spec or a server log line ties back to a call site.

Method (Python / Node) Endpoint
config / config GET /api/integrations/config
health_check / healthCheck GET /api/health-check
token_info / tokenInfo GET /api/token/info
integration_status / integrationStatus GET /api/integrations/status
components / components GET /api/integrations/components/extended
available_predictions / availablePredictions GET /api/integrations/predictions/available
forecast / forecast GET /api/integrations/planner/forecast
planner_grid / plannerGrid GET /api/integrations/planner/grid
failure_windows / failureWindows GET /api/integrations/predictions/failure-windows
failure_instances / failureInstances GET /api/integrations/predictions/failure-instances
probability_between / probabilityBetween GET /api/integrations/predictions/probability-between
select_predictions / selectPredictions POST /api/integrations/predictions/select
export_predictions / exportPredictions POST /api/integrations/predictions/export
convert_prediction / convertPrediction POST /api/integrations/planner/convert-prediction
submit_optimizer_feedback / submitOptimizerFeedback POST /api/integrations/optimizer/feedback
aircraft / aircraft GET /api/integrations/aircraft/extended
fleet_export / fleetExport GET /api/integrations/fleet/export
fleet_summary / fleetSummary GET /api/integrations/fleet/summary
scenarios, create_scenario / scenarios, createScenario GET, POST /api/integrations/scenarios
asset_configurations, create_asset_configuration / assetConfigurations, createAssetConfiguration GET, POST /api/integrations/asset-configurations
maintenance_programs / maintenancePrograms GET /api/integrations/maintenance-programs
submit_sensor_data / submitSensorData POST /api/v1/sensor-data/batch
submit_aircraft / submitAircraft POST /api/v1/aircraft/batch
submit_components / submitComponents POST /api/v1/components/batch
submit_maintenance / submitMaintenance POST /api/v1/maintenance/batch
submit_work_orders / submitWorkOrders POST /api/v1/work-orders/batch

Sending data in

The five batch methods accept up to 1000 records per call and report a partial success rather than raising. A 200 does not mean every row landed, so read the counts:

result = trakt.submit_sensor_data([
    {"component_id": 1, "timestamp": "2026-02-13T09:00:00Z",
     "temperature": 85.2, "external_id": "fdr-abc-001"},
])

print(result["stored"], result["duplicates"], result["rejected"])
for error in result["errors"]:
    print(error["row"], error["reason"])

Rows that fail validation or that name a component outside your company are rejected on their own, with the index they occupied in your array, while the rest of the batch is stored. Supplying external_id makes retries idempotent: a repeat of the same identifier at the same timestamp comes back as a duplicate rather than being written twice.

Chunking above 1000 is left to you, so a partial failure stays attributable to a specific request instead of being hidden inside a loop the client ran for you.

Handling errors

Both clients raise typed errors, so you can catch the case you care about.

from trakt import AuthenticationError, PermissionError_, RateLimitError

try:
    components = trakt.components()
except AuthenticationError:
    print("The token was not accepted.")
except PermissionError_:
    print("This token's access level does not cover that call.")
except RateLimitError:
    print("Quota exhausted. The client already retried with backoff.")
import { AuthenticationError, PermissionError, RateLimitError } from "@kquika-inc/trakt";

try {
  const components = await trakt.components();
} catch (e) {
  if (e instanceof AuthenticationError) console.error("The token was not accepted.");
  else if (e instanceof PermissionError) console.error("Access level does not cover that call.");
  else if (e instanceof RateLimitError) console.error("Quota exhausted.");
  else throw e;
}

What the clients do for you

  • Auth. Set the token once; every request carries the bearer header.
  • Retries. A rate limit or a transient server failure is retried with exponential backoff and jitter, honoring Retry-After when it is sent. A rejected token or a permission error is not retried, because retrying will not fix it.
  • Typed errors. AuthenticationError, PermissionError, RateLimitError, NotFoundError, ServerError.
  • Flattened objects. The nested prediction, survival, and maintenance blocks are lifted onto the component, so health and recommended_action are one attribute away.
  • Useful ordering. Components come back most urgent first; forecast items come back soonest first.

Reading the fields

Field Meaning
health 0 to 100, where higher is healthier.
health_trend stable, declining, or critical.
predicted_rul_hours / predicted_rul_days Remaining useful life before attention is due.
failure_probability 0 to 1, the modeled chance of failure in the near term.
recommended_action do_nothing, monitor, inspect, repair, or replace.
priority The urgency band for planning.
task_reference The task identifier from your source system, so a row ties back to its task.
days_until_due Negative means the item is already past due.

Access levels

Your token is issued at one of three levels, which control both the endpoints it can reach and how many records a request returns:

  • read_only: read predictions and forecasts
  • read_write: read, plus the write endpoints
  • full: everything, including fleet export

A call outside your token's level raises a permission error. Call config() to see the level and limits for your token rather than guessing.

Need a client in another language?

The SDKs are generated from an OpenAPI specification, which the API serves directly, so the contract you generate from is always the one the service is running:

curl -O https://trakt.tech/api/openapi.yaml     # as authored
curl -O https://trakt.tech/api/openapi.json     # for tooling that wants JSON

Both are unauthenticated, because the spec describes the shape of the API rather than any data. Every endpoint it documents still needs a bearer token.

Point your generator of choice at it, for example:

openapi-generator-cli generate \
  -i https://trakt.tech/api/openapi.yaml \
  -g go -o ./trakt-go

Citation

If Trakt informs a paper, technical report, reliability study, or regulatory submission, cite the release you actually ran.

Two things here are citable and they are not the same. Cite Trakt System when your results depend on its predictions, which is the usual case. Cite the client library only when the work is about the client itself, or when a reviewer needs to reproduce the exact calls you made.

Citing Trakt System

The API documentation renders the current platform citation in BibTeX, APA, IEEE, and CITATION.cff, generated from the running service so the version is never stale: https://trakt.tech/api-documentation#citation

That page is the source to copy from. This README deliberately does not restate the platform version, because a version pinned in a package README goes out of date the moment the service ships a release.

Citing this client

BibTeX

@misc{kquika2026traktpy,
  title        = {Trakt System Python SDK},
  author       = {{Kquika, Inc.}},
  year         = {2026},
  version      = {1.2.0},
  publisher    = {{Kquika, Inc.}},
  howpublished = {\url{https://pypi.org/project/kquika-trakt/}},
  url          = {https://pypi.org/project/kquika-trakt/},
  note         = {Computer software, version 1.2.0}
}

@misc{kquika2026traktjs,
  title        = {Trakt System Node SDK},
  author       = {{Kquika, Inc.}},
  year         = {2026},
  version      = {1.1.5},
  publisher    = {{Kquika, Inc.}},
  howpublished = {\url{https://www.npmjs.com/package/@kquika-inc/trakt}},
  url          = {https://www.npmjs.com/package/@kquika-inc/trakt},
  note         = {Computer software, version 1.1.5}
}

@misc is used because every BibTeX style accepts it. On biblatex you can change the type to @software and drop howpublished.

APA 7th

Kquika, Inc. (2026). Trakt System Python SDK (Version 1.2.0) [Computer software]. https://pypi.org/project/kquika-trakt/

Kquika, Inc. (2026). Trakt System Node SDK (Version 1.1.5) [Computer software]. https://www.npmjs.com/package/@kquika-inc/trakt

In text: (Kquika, Inc., 2026).

IEEE

Kquika, Inc., "Trakt System Python SDK," version 1.2.0, 2026. [Online]. Available: https://pypi.org/project/kquika-trakt/

Kquika, Inc., "Trakt System Node SDK," version 1.1.5, 2026. [Online]. Available: https://www.npmjs.com/package/@kquika-inc/trakt

CITATION.cff

Drop this in the root of a repository that depends on Trakt and reference managers will pick it up. Keep the entry for the client you actually use.

cff-version: 1.2.1
message: "If you use Trakt in your work, please cite it as below."
title: "Trakt System Python SDK"
type: software
version: "1.2.0"
license: MIT
url: "https://pypi.org/project/kquika-trakt/"
repository-artifact: "https://pypi.org/project/kquika-trakt/"
authors:
  - name: "Kquika, Inc."

For the Node client, change title to Trakt System Node SDK, version to 1.1.5, and both URLs to https://www.npmjs.com/package/@kquika-inc/trakt.

Reporting the version

Pin the version in your methods section. The client reports itself in the User-Agent on every request, so a server log line and a paper can be tied together:

trakt-python/1.2.0
trakt-node/1.1.5

Read it at run time rather than transcribing it, so the number in your write up cannot drift from the number that ran:

import trakt
print(trakt.__version__)
import { VERSION } from "@kquika-inc/trakt";
console.log(VERSION);

Predictions also depend on which models produced them, and those version independently of both the API and this client. Call GET /models/status at run time and record the model version alongside the API version, so a reviewer can tell which models produced your numbers.

Support

API reference: https://trakt.tech/api-documentation

Questions, a token, or a raised limit: support@kquika.com

License

MIT

Release files for kquika-trakt 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kquika-trakt 1.2.0
File Size Uploaded
kquika_trakt-1.2.0.tar.gz 19.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kquika-trakt 1.2.0
File Interpreter ABI Platform
kquika_trakt-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size:38.9 kB

Release files / kquika_trakt-1.2.0.tar.gz

Download URL kquika_trakt-1.2.0.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b736a9dfd31f675ba4fcd799d9defe416adfda3f64750490c0eb54fb5dde7eb7
BLAKE2b-256 checksum
How to use checksums
f77ea8736d1319b8c76b5bf7eaf35a389d226fea3d506d15710d6b312e35ab94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / kquika_trakt-1.2.0-py3-none-any.whl

Download URL kquika_trakt-1.2.0-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e6c37b94807f9d819b5e090242227156c4489658cc0bbbd3f523768ce79179c
BLAKE2b-256 checksum
How to use checksums
51b90728f6e7f12f3bc2d16a16171fbd42463a132e6c8fafb93109d3ce04aa0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

1.3.0

2 release files

This release

1.2.0 This release

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page