npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kquika-inc/trakt

v1.0.8

Published

Trakt System Integrations API client: fleet predictions and maintenance forecasts.

Readme

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.

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()

Node / TypeScript

import { Trakt } from "@kquika/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);
}

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, 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 built from an OpenAPI specification, so a client can be generated for most languages. Contact us and we will provide the spec.

Support

Questions, a token, or a raised limit: [email protected]

License

MIT