Scripts for interacting with the Columbia University Libraries ArchivesSpace instance on an ad-hoc basis. Includes tools for managing access restrictions, container data, digital objects, locations, and metadata exports.
- Python 3.10+
- See
requirements.txtfor dependencies
- Install dependencies:
pip install -r requirements.txt - Create a credentials file by renaming
local_settings.cfg.exampletolocal_settings.cfgand updating it with your ArchivesSpace credentials and base URL.
| Script | Description |
|---|---|
add_containers.py |
Propagates container instance data to archival objects missing it |
add_dlc_dos.py |
Creates and attaches IIIF digital objects to archival objects |
add_locations.py |
Adds location data to top containers |
add_metadata_rights.py |
Adds metadata rights declarations to published resources |
aspace_barcodes.py |
Fetches top container barcodes using FOLIO HRIDs; adds barcodes to top containers from a spreadsheet |
reorder_one_series.py |
Identifies and removes redundant single-series structure |
restriction_lifter.py |
Exports and removes expired access restriction notes |
update_access_notes.py |
Updates access restriction note text across a series or repository |
update_hyacinth_metadata.py |
Exports archival object metadata for Hyacinth import |
update_instances.py |
Disambiguates box numbers by adding prefixes to container indicators |
This project follows PEP 8 style guidelines, enforced in VS Code via the following extensions:
- black — formats code automatically on save
- isort — sorts imports alphabetically and by
type on save, using the
blackprofile for compatibility - flake8 — checks for style issues, errors, and
complexity; configured via
.flake8
To replicate this setup, install the
Black Formatter,
isort, and
Flake8
VS Code extensions. Project settings are in .vscode/settings.json.
Docstrings follow Google's docstring style guide. Use one-line docstrings for immediately self-explanatory cases; use multi-line docstrings for everything else.
New code should have unit tests. Tests are written using pytest and pytest-mock, and run via tox. To run the tests and coverage report:
tox -e py311