Refactor and improve documentation, add examples

This commit is contained in:
JY Tan
2025-12-23 18:43:07 -08:00
parent b98b640f5a
commit 8db245f56e
32 changed files with 1348 additions and 162 deletions

View File

@@ -0,0 +1,36 @@
# Recipe: `pip` / `poetry`
Goal: allow Python dependency fetching while keeping egress minimal.
## Start restrictive (PyPI)
```json
{
"network": {
"allowedDomains": ["pypi.org", "files.pythonhosted.org"]
},
"filesystem": {
"allowWrite": [".", "/tmp"]
}
}
```
Run:
```bash
fence --settings ./fence.json pip install -r requirements.txt
```
For Poetry:
```bash
fence --settings ./fence.json poetry install
```
## Iterate with monitor mode
```bash
fence -m --settings ./fence.json poetry install
```
If you use private indexes, add those domains explicitly.