Installation

This guide describes how to set up your environment to use Forge packages and examples.

Quick Start

Install uv

Follow the uv installation guide.

Create your project
  1. Create a new directory for your project.

  2. In that directory, add a pyproject.toml file.

The TOML file is a configuration file used by packaging tools and by other tools such as linters and type checkers. It specifies your project dependencies and tells uv where to look for those dependencies. The Forge Python packages are provided as Python wheels under the <SIP>/Forge/packages.

Example:

[project]
name = "<project-name>"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = [
    "fsp-config-foundation>=0.5.0",
]

# Use this if packages are available locally
[tool.uv]
system-certs = true # add this if behind a proxy
find-links = ["/path/to/wheel/directory"]

# Use this if packages are available in a pip server
[[tool.uv.index]]
url = "https://mydomain/pypi/packages"

Then run:

uv sync --all-packages

This command creates a new Python virtual environment (.venv) with the Python version specified in the TOML file. It also installs all packages that the project depends on in the same virtual environment.

VS Code Setup (Optional)

If you use Visual Studio Code, install these extensions for a better development experience:

  • ms-python.python: Python language support and debugging

  • tamasfe.even-better-toml: TOML file editing and validation

  • ms-python.pylint: Python linting

  • ms-python.mypy-type-checker: Static type checking

  • charliermarsh.ruff: Fast Python formatter and linter

Example Project

To get a better understanding of how to use Forge, please refer to the examples provided in your delivery. A full example that covers configuration and embedded code can be found under: <SIP>/examples/weather_example/forge. Additional Forge examples are located in the <SIP>/Forge/examples directory and cover various use cases and configurations.