> For the complete documentation index, see [llms.txt](https://docs.sealsecurity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealsecurity.io/setup-apps-os/artifact-server/configuring-package-managers/pdm.md).

# Configuring PDM

Point PDM at the Seal Artifact Server using a package source in pyproject.toml.

PDM reads package sources from the `[[tool.pdm.source]]` table in `pyproject.toml`. A source named `pypi` replaces the default PyPI index, so every package resolves from Seal.

## Configuration

Add the source to the project's `pyproject.toml`:

```toml
[[tool.pdm.source]]
name = "pypi"
url = "https://${SEAL_PROJECT}:${SEAL_TOKEN}@pypi.sealsecurity.io/simple"
```

Set `SEAL_PROJECT` to the Seal [Project ID](https://docs.sealsecurity.io/getting-started/creating-a-seal-project.md#project-id-and-project-name) and `SEAL_TOKEN` to your production token. PDM expands the environment variables when it reads the URL, so the credentials stay out of the committed file. Commit the change so the configuration is version-controlled with the manifest.

`pdm.lock` records package names, versions, and hashes, not the source URL. Run `pdm lock` once after adding the source so the lock file resolves against Seal, then `pdm sync` installs from it as usual.

## Verify

```bash
pdm lock -v
```

The verbose output shows each download URL. The URLs should start with `https://pypi.sealsecurity.io/simple/`.

## Related

* [Editing dependency files manually](https://docs.sealsecurity.io/using-platform/working-with-seal-apps/artifact-server/poetry.md): pinning sealed versions in `pyproject.toml`.
* [Configuring Poetry](https://docs.sealsecurity.io/setup-apps-os/artifact-server/configuring-package-managers/poetry.md): the Poetry equivalent for the same ecosystem.
