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:
[[tool.pdm.source]]
name = "pypi"
url = "https://${SEAL_PROJECT}:${SEAL_TOKEN}@pypi.sealsecurity.io/simple"Set SEAL_PROJECT to the Seal Project ID 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
pdm lock -vThe verbose output shows each download URL. The URLs should start with https://pypi.sealsecurity.io/simple/.
Related
Editing dependency files manually: pinning sealed versions in
pyproject.toml.Configuring Poetry: the Poetry equivalent for the same ecosystem.
Last updated