Skip to main content

Installation & setup

Get from nothing to a working environment. Install Lattica Studio, get your License, and point your code at it. A few minutes, then you are ready to build, deploy, generate keys, and query.

What you need

Python

Version 3.11 or newer.

A License

Your account token, from the console.

Credits

For running a worker. Added in the console.

Setup

1

Install Lattica Studio

Install lattica-studio. Lattica Studio is the workspace for building pipelines, deploying them, and managing models, tokens, and workers. It also pulls in lattica-build (HomOps) and lattica-query (encrypted queries). For a researcher setup, that is the whole flow from one environment.
bash
# Lattica Studio: build, deploy, tokens, workers (pulls lattica-build and lattica-query)
pip install lattica-studio
2

Get your License

Sign up and log in to the console, then take your License. This is a console-only step, you cannot get a License from code. You will also add credits here if your balance is low.
The console is where you get your License and add credits. Build and deploy happen from Lattica Studio, which you just installed. Pricing & console
3

Make the token available

Keep your License out of your source code. The common pattern is an environment variable your script reads at run time.
bash
# set it in your shell
export LATTICA_LICENSE_KEY="your-license-here"
Then read it in Python with os.environ["LATTICA_LICENSE_KEY"] and pass it to LatticaStudio.
4

Check it works

Confirm Lattica Studio imports and accepts your License. If this runs without error, your environment is ready.
python
# quick check
import os
from lattica_studio import LatticaStudio

studio = LatticaStudio(os.environ["LATTICA_LICENSE_KEY"])
print("ready")

What you now have

Lattica Studio installed (with the query client it depends on), and your License wired in. That is everything the rest of these docs assume. From here, the flow is build, deploy, key generation, query.
For the bigger picture of what each client does and how they connect, see Architecture.

Next

Start building

Build the Pipeline

Compose a pipeline from HomOps and set its parameters.