# Quickstart: Python

Fold Trp-cage with ESMFold and download the structure.

## 1. Install and sign in

```
pip install dyno-phi
phi auth login
```

One package carries the SDK and the CLI; or uv add dyno-phi. The package is dyno-phi on PyPI, published from the phi-api repository; the import stays phi. dyno-phi 0.2.x was an earlier, unrelated client and is retired. phi auth login opens the browser, signs you in with your Dyno account and saves a profile with the organization you choose. On a machine with no browser, add --device. An agent or a script passes its key with --key instead, or sets PHI_API and PHI_KEY in its environment. The client reads the saved profile, or takes base_url= and api_key= directly.

## 2. Submit

```
from phi import PhiClient

with PhiClient() as phi:
    submitted = phi.jobs.submit(
        "ESMFOLD",
        inputs={"sequences": ["NLYIQWLKDGGPSSGRPPPS"]},
        name="quickstart-trp-cage",
    )
    print(submitted.job_id)
```

## 3. Wait

```
    job = phi.jobs.wait(submitted.job_id)
    print(job.status)
```

wait polls at the workload's interval and returns the terminal job rather than raising; check job.status.

## 4. Download the structure

```
    artifacts = phi.artifacts.list(submitted.job_id, suffix=".pdb")
    manifest = phi.artifacts.download(artifacts, "results")
    print(manifest)   # results/manifest.json; the PDB is under results/structures/
```

## 5. Install Phi's skills

```
npx skills add dynotx/phi-skills
```

This installs the skills for Claude Code, Cursor and Codex in the current project. Add -g to install them for every project on the machine. The CLI command phi skills install does the same.

---
Source: https://phi.dynotx.com/docs/quickstart/python
