blumeops/docs/how-to/configuration/use-pypi-proxy.md
Erich Blume 27d8f3cf1f Review gandi-operations doc and reorganize how-to guides (#200)
## Summary
- **Doc review:** Reviewed `gandi-operations.md` — added `last-reviewed` frontmatter, verified all wiki-links, confirmed Pulumi state has no drift
- **Gandi reference fix:** Added missing `cv.eblu.me` CNAME row to `gandi.md` DNS records table (was present in Pulumi but undocumented)
- **Pulumi comment fix:** Updated stale `README.md` reference in `__main__.py` to point to `docs/how-to/gandi-operations.md`
- **How-to reorg:** Moved 14 how-to guides into 3 subdirectories (`deployment/`, `configuration/`, `operations/`), collapsed the Documentation and Database index sections into Configuration and Operations respectively

## Verification
- `docs-check-links` — all 180 wiki-links valid
- `docs-check-filenames` — all 90 filenames unique
- `dns-preview` — 5 resources unchanged, no drift
- All pre-commit hooks pass

## Test plan
- [ ] Verify docs site builds correctly with new paths
- [ ] Spot-check a few wiki-links from other pages to moved how-to guides

Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/200
2026-02-17 07:29:33 -08:00

61 lines
1.2 KiB
Markdown

---
title: Use PyPI Proxy
modified: 2026-02-07
tags:
- how-to
- python
---
# Use the PyPI Proxy
How to configure clients and publish packages to [[devpi]].
## Configure pip/uv
Point pip and uv at the proxy via environment variables:
```bash
export PIP_INDEX_URL="https://pypi.ops.eblu.me/root/pypi/+simple/"
export UV_INDEX_URL="https://pypi.ops.eblu.me/root/pypi/+simple/"
```
Unset both to fall back to public PyPI (e.g. when [[indri]] is offline).
The [dotfiles repo](https://github.com/eblume/dotfiles) has shell config
that manages this toggle.
## Upload Packages
```bash
# Build and publish with uv
cd ~/code/personal/your-package
uv build
uv publish --publish-url https://pypi.ops.eblu.me/eblume/dev/
# First time: uv will prompt for credentials
```
## Create Users/Indices
```bash
# Login as root
uvx devpi use https://pypi.ops.eblu.me
uvx devpi login root
# Create user (prompts for password - store in 1Password)
uvx devpi user -c USERNAME email=EMAIL
# Create index inheriting from PyPI mirror
uvx devpi index -c USERNAME/dev bases=root/pypi
```
## Verify Cache
```bash
# Check if devpi is caching
curl -s https://pypi.ops.eblu.me/+api | jq
```
## Related
- [[devpi]] - Service reference