Installation

The installation phase involves:

  1. Installing the NOS-T Tools library

  2. Cloning the NOS-T tools repository

  3. Configuring the necessary credentials to interact with the NOS-T infrastructure

Integrated Development Environment

An Integrated Development Environment (IDE) will make developing applications and interacting with NOS-T much easier. Below is a list of recommended IDEs:

  • Visual Studio Code (VS Code): Lightweight, highly customizable, supports many languages via extensions.

  • IntelliJ IDEA: Excellent for Java and Kotlin, with strong support for other JVM languages.

  • Eclipse: Popular for Java development, also supports C/C++, Python, and more.

  • PyCharm: Feature-rich Python IDE by JetBrains, great for web development and data science.

Note

Users are encouraged to use VS Code due to its lightweight design, ease of setup, and strong community support. It also offers built-in support for Jupyter notebooks, making it especially helpful for getting started with NOS-T development.


NOS-T Tools Installation

The NOS-T Tools library is available on PyPi and can be installed using pip, the standard package manager for Python or conda. Below are the instructions for both methods.

Pip

To install NOS-T tools using pip, follow these steps:

  1. Upgrade pip to the latest version:

python -m pip install --upgrade pip
  1. Install NOS-T Tools:

python3 -m pip install nost-tools

To install additional libraries required to run the NOS-T Tools examples:

python3 -m pip install "nost_tools[examples]"

Conda

For instructions on how to install Conda, see the: Conda documentation.

To install NOS-T tools using conda:

  1. Create a new conda environment (recommended):

conda create -n nost python=3.11
conda activate nost
  1. Install NOS-T tools:

python3 -m pip install nost-tools

To install additional libraries required to run the examples:

python3 -m pip install "nost_tools[examples]"

Note

Following the instructions above will install the Python packages that the test suite depends on to run. The details of these dependencies, including version numbers, can otherwise be found in the requirements file.


Repository Cloning

The recommended way to access the example code is by cloning the NOS-T Tools repository from GitHub. If you’re unfamiliar with how to clone a Git repository, you can find detailed instructions here.

Clone the repository:

git clone git@github.com:code-lab-org/nost-tools.git

If the above fails, you can also try the HTTPS version:

git clone https://github.com/code-lab-org/nost-tools.git

Credentials

Credentials required by the NOS-T infrastructure can be defined in your bashrc file or using a .env file. The required credentials depend on the authentication mode. NOS-T supports three modes:

  1. Basic Auth (localhost/development): USERNAME + PASSWORD only

  2. Keycloak Service Account (automated systems): CLIENT_ID + CLIENT_SECRET_KEY only

  3. Keycloak User Account (interactive users): USERNAME + PASSWORD + CLIENT_ID + CLIENT_SECRET_KEY

See Authentication Modes for full details on each mode.

Bashrc

Open your bashrc file:

vim ~/.bashrc

Add the lines appropriate for your authentication mode. For example, for Keycloak user account:

export USERNAME=<NOS-T Keycloak Username>
export PASSWORD=<NOS-T Keycloak Password>
export CLIENT_ID=<Ask NOS-T Operator>
export CLIENT_SECRET_KEY=<Ask NOS-T Operator>

Source the changes:

source ~/.bashrc

.env

You can create a .env file using the same values as listed above:

vim .env

Add the lines appropriate for your authentication mode. For example:

# Basic Auth (localhost) - only username and password
USERNAME="admin"
PASSWORD="admin"

# For Keycloak modes, also add:
# CLIENT_ID=<Ask NOS-T Operator>
# CLIENT_SECRET_KEY=<Ask NOS-T Operator>

Important

Restart your computer after defining environmental variables in your ~/.bashrc file.

Dependencies and Requirements

NOS-T Tools has several dependencies that are essential for its functionality.

See also

For a complete list of dependencies and version requirements, refer to the project specification file (pyproject.toml) in the repository.

Below is a categorized list of these dependencies, including both core and optional libraries:

Core Dependencies

The core dependencies include essential libraries required for the basic functionality of NOS-T Tools:

Optional Dependencies

NOS-T Tools also supports several optional dependencies that enhance its functionality for specific use cases. These dependencies can be installed as needed.

Examples

The examples optional dependencies include additional libraries for running example applications including:

To install the optional dependencies for examples:

python3 -m pip install "nost_tools[examples]"  # For example applications

Development

The dev optional dependencies include additional libraries for development and testing including:

To install the optional dependencies for development: .. code-block:: bash

python3 -m pip install “nost_tools[dev]” # For development tools

Documentation

The docs optional dependencies include additional libraries for building documentation including:

To install optional dependencies for documentation:

python3 -m pip install "nost_tools[docs]"      # For documentation building

Note

If you encounter compatibility issues, check your Python version (3.8+) and ensure your environment meets all requirements.

Next Steps

Important: NOS-T requires an event broker to function. To get started:

  1. Set up a local RabbitMQ broker: RabbitMQ Broker on Local Host guide. Alternatively, you can use a cloud-based broker by checking in with the NOS-T operator.

  2. Verify your installation by testing the publisher-consumer example: Creating a Simple Publisher-Consumer Example

These steps will ensure your environment is correctly configured and ready for developing with NOS-T.