To facilitate the consumption of T-Lang build artifacts from within
other languages, we provide lightweight helper packages for
R, Python, and Julia.
All these packages are named tlang in
their respective ecosystems. These packages allow you to easily locate
and read built nodes from a T pipeline without manually parsing build
logs or resolving Nix store paths.
These packages are automatically installed and
loaded in every R, Python, and Julia node in a T pipeline. You
do not need to install them manually. The read_node()
function and its dependencies are ready to use immediately.
For project development shells, t update also wires the
matching companion package into flake.nix whenever you
declare dependencies in [r-dependencies],
[py-dependencies], or [jl-dependencies], so
the helper is available from nix develop as well.
read_node(name): Automatically locates
the latest build log in the _pipeline/ directory, finds the
requested node, and deserializes its artifact.pipeline_nodes(): Returns the pipeline
DAG (nodes and their dependencies) as an idiomatic data structure (data
frame in R, dictionary in Python/Julia).which_log argument to select a specific build log using a
regular expression.return_path support: If you only need
the absolute path to the artifact (e.g., to pass to a specialized
loader), set return_path = true.tlangThe R package is automatically loaded in all R nodes.
# read_node is available by default
# library(tlang) is called automatically
# Read the latest 'my_data' node
df <- read_node("my_data")
# Get only the path to the artifact
path <- read_node("my_model", return_path = TRUE)
# Inspect the pipeline DAG (returns a data.frame)
nodes <- pipeline_nodes()tlangThe Python package is automatically imported in all Python nodes.
# read_node is available by default
# import tlang is called automatically
# Read the latest 'my_data' node
df = tlang.read_node("my_data")
# Get only the path to the artifact
path = tlang.read_node("my_model", return_path=True)
# Inspect the pipeline DAG (returns a dict)
nodes = tlang.pipeline_nodes()tlangThe Julia package is automatically loaded with
using tlang in all Julia nodes.
# read_node is available by default
# using tlang is called automatically
# Read the latest 'my_data' node
df = read_node("my_data")
# Get only the path to the artifact
path = read_node("my_model", return_path=true)
# Inspect the pipeline DAG (returns a Dict)
nodes = pipeline_nodes()When you run build_pipeline(), T-Lang generates a
timestamped build log (e.g.,
_pipeline/build_log_20260514_160236.json). These helper
packages:
_pipeline/ directory for
build_log_*.json files.path (which might be relative to the
project root or an absolute Nix store path).readRDS for R,
pickle.load for Python,
Serialization.deserialize for Julia).