Skip to main content

tango-takeoff

A tool that can find, start and stop Tango Device Servers. It's like Astor for the command line.

In general, the tool is explaining itself. Run it and look at the output.

Installation

tango-takeoff is on PyPI and conda-forge. Install it with your preferred package manager: pip, uv, conda or pixi.

As it's intended to be used as a script, we recommend installing it globally. With uv, do:

uv tool install tango-takeoff

And with pixi:

pixi global install tango-takeoff

Usage

The tool depends on the TANGO_HOST environment variable.

Help

> takeoff --help
usage: takeoff [-h] {find,up,down,restart} ...

Start (up), stop (down) or restart (restart) Tango Device Servers

positional arguments:
  {find,up,start,down,stop,restart}
    find                Finds servers based on terms and shows the 'dry run' version of what will be used in 'up' and 'down'
    up (start)          Bring servers up based on terms
    down (stop)         Bring servers down based on terms
    restart             Restart servers based on terms

options:
  -h, --help      show this help message and exit

Find

> takeoff find --help
usage: takeoff find [-h] [--json] [--default-host DEFAULT_HOST] [-v] servers [servers ...]

positional arguments:
  servers               A name or search term of a server, use * for wildcard in the end of the name. Use the format [host,]<server-name>

  options:
    -h, --help            show this help message and exit
    --json                Output structured as JSON (default: False)
    --default-host DEFAULT_HOST
                          Default host for Tango device servers (default: None)
    -v, --verbose         Set the trace level. Can be used in count way: -vv or --verbose --verbose (default: None)

Up / Start

> takeoff up --help
usage: takeoff up [-h] [--json] [--default-host DEFAULT_HOST] [-v] [-t RUNNING_TIMEOUT] [-s STARTER_TIMEOUT] [-d] servers [servers ...]

positional arguments:
  servers               A name or search term of a server, use * for wildcard in the end of the name. Use the format [host,]<server-name>[,<level>]

options:
  -h, --help            show this help message and exit
  --json                Output structured as JSON (default: False)
  --default-host DEFAULT_HOST
                        Default host for Tango device servers (default: None)
  -v, --verbose         Set the trace level. Can be used in count way: -vv or --verbose --verbose (default: None)
  -t RUNNING_TIMEOUT, --timeout RUNNING_TIMEOUT
                        Time to wait for a server to be running (in seconds) (default: 60)
  -s STARTER_TIMEOUT, --starter-timeout STARTER_TIMEOUT
                        Time to wait for starter if it's not running (in seconds) (default: 10)
  -d, --dry-run         outputs the servers with the details that will take effect by the command (default: False)

Down / Stop

> takeoff down --help
usage: takeoff down [-h] [--json] [--default-host DEFAULT_HOST] [-v] [-f] [-k KILL_TIMEOUT] [-s STARTER_TIMEOUT] [-d] servers [servers ...]

positional arguments:
  servers               A name or search term of a server, use * for wildcard in the end of the name. Use the format [host,]<server-name>

options:
  -h, --help            show this help message and exit
  --json                Output structured as JSON (default: False)
  --default-host DEFAULT_HOST
                        Default host for Tango device servers (default: None)
  -v, --verbose         Set the trace level. Can be used in count way: -vv or --verbose --verbose (default: None)
  -f, --force           Force kill servers (default: False)
  -k KILL_TIMEOUT, --kill-timeout KILL_TIMEOUT
                        Time before force killing (in seconds) (default: 30)
  -s STARTER_TIMEOUT, --starter-timeout STARTER_TIMEOUT
                        Time to wait for starter if it's not running (in seconds) (default: 10)
  -d, --dry-run         outputs the servers with the details that will take effect by the command (default: False)

Restart

> takeoff restart --help
usage: takeoff restart [-h] [--json] [--default-host DEFAULT_HOST] [-v] [-f] [-k KILL_TIMEOUT] [-t RUNNING_TIMEOUT] [-s STARTER_TIMEOUT] [-d] [-w WAIT_AFTER_STOP] servers [servers ...]

positional arguments:
  servers               A name or search term of a server, use * for wildcard in the end of the name. Use the format [host,]<server-name>

options:
  -h, --help            show this help message and exit
  --json                Output structured as JSON (default: False)
  --default-host DEFAULT_HOST
                        Default host for Tango device servers (default: None)
  -v, --verbose         Set the trace level. Can be used in count way: -vv or --verbose --verbose (default: None)
  -f, --force           Force kill servers (default: False)
  -k KILL_TIMEOUT, --kill-timeout KILL_TIMEOUT
                        Time before force killing (in seconds) (default: 30)
  -t RUNNING_TIMEOUT, --timeout RUNNING_TIMEOUT
                        Time to wait for a server to be running (in seconds) (default: 60)
  -s STARTER_TIMEOUT, --starter-timeout STARTER_TIMEOUT
                        Time to wait for starter if it's not running (in seconds) (default: 10)
  -d, --dry-run         outputs the servers with the details that will take effect by the command (default: False)
  -w WAIT_AFTER_STOP, --wait-after-stop WAIT_AFTER_STOP
                        Time to wait between stop / start (in seconds) (default: 1)

Testing

To test locally, you can use pixi.

Required setup:

  1. You can use our own mariadb if you already have an instance running. If not, run pixi run mariadb. It will start a mariadb docker image with the Tango schema already configured. It can be stopped with pixi run stop-mariadb. Data will be saved locally under .data.

  2. Start a Tango Databaseds by running pixi run db. Same as before. You could use your own instance if you prefer. Press CTRL-C to stop it.

  3. export TANGO_HOST to point to your tango database (127.0.0.1:10000 if you used the previous steps).

  4. Start Starter by running pixi run starter. This will automatically create the required Tango devices and install some servers for testing purpose:

    • TangoTest
    • UniversalTest
    • SlowToStart: a dummy server that takes 7 seconds to start
    • SlowToStop: a dummy server that takes 7 seconds to stop
    • FailToStart: a dummy server that can't start (raises an exception in init_device)

Once you have Starter running, you can run the tests using pixi run pytest -v.

You can also manually test different scenarios by running pixi run takeoff and passing any argument you want. Or run pixi shell and then takeoff directly.

For convenience, you have 2 tasks predefined:

  • pixi run up to start all the servers
  • pixi run down to stop all the servers

Metadata

Release files for tango-takeoff 3.0.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 tango-takeoff 3.0.0
File Size Uploaded Provenance Actions
tango_takeoff-3.0.0.tar.gz 63.9 kB Without provenance Details for tango_takeoff-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tango-takeoff 3.0.0
File Interpreter ABI Platform Actions
tango_takeoff-3.0.0-py3-none-any.whl Python 3 none any Details for tango_takeoff-3.0.0-py3-none-any.whl

Total release size: 93.4 kB

Release files / tango_takeoff-3.0.0.tar.gz

Download URL tango_takeoff-3.0.0.tar.gz
Size 63.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f770b15fce376fc0dd706e0a4a3ecc84ef3b77a840d0b9777de8bccf0e2eb938
BLAKE2b-256 checksum
How to use checksums
0d86bf5c7a147387b5c46be417e19ab70160cc55eb84c8ab147453e0bfde64bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / tango_takeoff-3.0.0-py3-none-any.whl

Download URL tango_takeoff-3.0.0-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52be5209e3546f4e64acd09c2ed85e5fd3b735a0a0820fc8d903c119422f1a82
BLAKE2b-256 checksum
How to use checksums
e72682e177a54e4ac5e4976d1bc271e7f3ae71c18b3385390335341d3aaf1ceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.12.12

Security for tango-takeoff 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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