Versioning and stability

The library has its own version number, separate from the ThrustLab API. This page tells you how to read the number, how to pin it so an update doesn't surprise you, and what changed in version 1.0.0.

Two version numbers

The library follows semantic versioning. The version has three parts, such as 1.2.3. A change to the last part fixes a bug. A change to the middle part adds something. A change to the first part may break your code.

The API address always starts with /v1/, and that does not change with the library version. Every API answer carries the header X-API-Stability: beta, which tells you the API is still young and may grow. The library number says nothing about that.

To read the version you have installed:

python
import thrustlab

print(thrustlab.__version__)

The library sends this number in the User-Agent header of every request.

Pin the version

In production, say which versions you accept, so a new major version can't arrive without you choosing it:

text
thrustlab>=1.0,<2.0

This takes every 1.x update and stops before 2.0.

What changed in 1.0.0

Version 1.0.0 made the library a plain client for the API. Every number now comes from ThrustLab's servers. These parts were removed:

  • The offline propeller estimate, thrustlab.estimate, and its command thrustlab-estimate.
  • The flight-simulator bridge, thrustlab.sitl, and its command thrustlab-sitl.
  • FMU export. Every method of client.fmu now raises a RemovedFeatureError without sending a request, so an old script fails with a clear message.
  • The dq-voltage drive in motor analyses, which raises the same error. Use a throttle input instead.

A test bench run also replaced the old flight_duration argument with hold_s. See Simulations.

Deprecation warnings

When an argument is on its way out, the library still accepts it and raises a DeprecationWarning. To fail your tests on a warning, add this to your test setup:

python
import warnings

warnings.filterwarnings("error", category=DeprecationWarning, module="thrustlab")

Read the full list of changes

The file CHANGELOG.md in the thrustlab-sdk repository lists every change in every version.