A mobile-friendly Flask web application for managing storage locations and top containers in ArchivesSpace. Designed for use in a stacks setting, staff scan QR codes posted at each physical location to view and move containers between locations.
- Staff scans a QR code at a physical location with a phone or tablet.
- The app queries the ArchivesSpace API for all top containers across all repositories at that location.
- Containers are displayed with details (name, repository, profile, associated collections).
- To move a container, staff taps "Move" on a container card, then scans the QR code at the destination location and confirms the move.
- A standalone script (
genlabels.py) generates printable QR code PNG labels for all defined locations.
application.py Flask app and routes
aspace_api_asnake.py ArchivesSpace API client (ArchivesSnake)
aspace_api.py ArchivesSpace API client (raw requests, unused)
genlabels.py Standalone QR code label generator
templates/
index.html Base template (Bootstrap 5)
container-list.html Container card grid
move-container.html "Scan destination" prompt
execute-move.html Move confirmation screen
qrcodes/ Pre-generated QR code PNGs
The app connects to ArchivesSpace via environment variables:
| Variable | Default | Description |
|---|---|---|
ASPACE_BASEURL |
https://sandbox.archivesspace.org/staff/api/ |
ArchivesSpace API URL |
ASPACE_USER |
admin |
ArchivesSpace username |
ASPACE_PASSWORD |
admin |
ArchivesSpace password |
uv run application.pyThe app starts on http://localhost:5000 in debug mode.
docker build -t aspacelocs .
docker run -d -p 8000:8000 aspacelocsThe production server (gunicorn) listens on port 8000.
python genlabels.pyThis fetches all location IDs from ArchivesSpace and saves QR code PNGs to qrcodes/. Each QR code encodes a URL like https://locs.ukrhec.org/locations/{id}.
- The ArchivesSpace Solr indexer may lag behind API changes, so moved containers may not appear at their new location immediately.
- The Flask secret key is regenerated on each restart, which invalidates all active sessions.