Skip to main content

invenio-subjects-lcsh

LCSH subject terms for InvenioRDM

Install this extension to get Library of Congress Subject Headings into your instance.

Note that this list excludes -781 geographical variations as it's not their original intent to be independent tagging terms.

Installation

From your instance directory:

uv add invenio-subjects-lcsh

This will add it to your Pipfile.

Versions

From 2025.6.4.1 onwards

This package follows the following format for versions: YYYY.mm.dd.patch where

  • YYYY.mm.dd is the date of retrieval of the LCSH terms with mm and dd NOT being 0-prefixed.
  • patch is the patch number (0-indexed) so that multiple releases can be done on the same day (bug/security fixes)

This follows calendar versioning (for year, month, and day) and adds a patch number at the end. The package is typically updated on a quarterly basis. The following are illustrative (fictitious) examples of how to understand the versioning of this distribution package:

Last LCSH update included patch number version of this project
2025-06-31 2 2025.6.31.2
2025-12-01 0 2025.12.1.0

Prior to 2025.6.4.1

This repository follows calendar versioning for year and month. It does a "best effort" attempt at tracking the LCSH updates in an up-to-and-including version date manner. The following are illustrative cases of how to understand the versioning of this distribution package:

Last LCSH update included version of this project date of release of this project
2024-01-31 2024.1.X any time after 2024-01-31
2023-12-31 2023.12.X any time after 2023-12-31

2021.06.18 is both a valid semantic version and an indicator of the year-month corresponding to the loaded terms. 18 here is a patch number (not a day).

Usage

There are 2 types of users for this package. Maintainers of the package and instance operators.

Update terms in an instance

For instance operators, after you have installed the extension as per the steps above, you will want to reload your instance's fixtures: pipenv run invenio rdm-records fixtures. This will install the new terms in your instance.

Alternatively, or if you want to update your already loaded subjects to a new listing (e.g. from one year's list to another), you can update your instance's LCSH subjects as per below. Updating subjects this way takes care of everything for you: the subjects themselves and the records/drafts using those subjects. WARNING This operation can remove subjects.

# In your instance's project
# Download up-to-date listings
invenio galter_subjects lcsh download -d /path/to/downloads/storage/
# Generate deprecated entries - metadata expert COULD look at them
invenio galter_subjects lcsh deprecated /path/to/downloads/storage/subjects.skosrdf.jsonld --output-file /path/to/deprecated.csv
# Generate replacement entries from those - metadata expert COULD look at them
invenio galter_subjects lcsh replacements /path/to/deprecated.csv --output-file /path/to/replacements.csv
# Generate file containing deltas to transition your instance to the downloaded listing - metadata expert SHOULD look at them
invenio galter_subjects lcsh deltas --subjects-file /path/to/downloads/storage/subjects.skosrdf.jsonld --replacements-file /path/to/replacements.csv -o /path/to/deltas_lcsh.csv
# Update your instance - *this operation will modify your instance*
invenio galter_subjects update /path/to/deltas_lcsh.csv

Look at the help text for these commands to see additional options that can be passed. In particular, options for galter_subjects update allow you to store renamed, replaced or removed subjects on records according to a template of your choice.

Maintain the initial vocabulary list

When a new list of LCSH terms comes out, this package should be updated to provide an up-to-date starting fixture. Here we show how.

Pre-requisite/Context

Install the distribution package for development before you do anything.

Commands

Once you have that dependency installed, you can run the following commands ((venv) denotes the isolated environment):

# In this project
# Download up-to-date listings
(venv) invenio galter_subjects lcsh download -d /path/to/downloads/storage/
# Generate file containing initial listing
(venv) invenio galter_subjects lcsh file -d /path/to/downloads/storage/ -o invenio_subjects_lcsh/vocabularies/subjects_lcsh.csv

When you are happy with the list, bump the version in pyproject.toml and release it.

Development

Install the project in editable mode with dev dependencies in an isolated virtualenv:

uv venv --python 3.14
uv pip install -e .[dev]

Run tests:

uv run inv test

Test compatibility with the pre-release version of InvenioRDM (invenio-app-rdm):

uv run --extra dev_pre --prerelease=allow inv test

Clean out artefacts:

uv run inv clean

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invenio_subjects_lcsh-2026.6.4.3.tar.gz (5.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

invenio_subjects_lcsh-2026.6.4.3-py3-none-any.whl (6.0 MB view details)

Uploaded Python 3

File details

Details for the file invenio_subjects_lcsh-2026.6.4.3.tar.gz.

File metadata

File hashes

Hashes for invenio_subjects_lcsh-2026.6.4.3.tar.gz
Algorithm Hash digest
SHA256 46cacb609003ec283812c2dedb252913875854c7b0f199ab6e35470462139fe9
MD5 54524575701eb664effba0389fdccaf2
BLAKE2b-256 5f7299d7fc2bf909f3ceed9ba16c5abdb2e6d22924d125973363c3bcd8197738

See more details on using hashes here.

Provenance

The following attestation bundles were made for invenio_subjects_lcsh-2026.6.4.3.tar.gz:

Publisher: publish-to-pypi.yml on galterlibrary/invenio-subjects-lcsh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file invenio_subjects_lcsh-2026.6.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for invenio_subjects_lcsh-2026.6.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a68df7ad5478661ebfa3b1341134361e8ca2dafcd55ae6ad8e7c551923843282
MD5 23ccb80f781850feab78a0e31ee5d64d
BLAKE2b-256 e4aa4877e1cf5472e63591773f20629b5bb2679811b29610d801b0ee4cc24d8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for invenio_subjects_lcsh-2026.6.4.3-py3-none-any.whl:

Publisher: publish-to-pypi.yml on galterlibrary/invenio-subjects-lcsh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2026.6.4.3 This release

2 files

2026.6.4.1

2 files

2026.1.23.1

2 files

2025.6.4.2

2 files

2025.6.4.1

2 files

2025.1.17

2 files

2024.1.1

2 files

2024.1.0

2 files

2023.11.2

2 files

2023.11.1

2 files

2022.11.24

2 files

2022.11.23

2 files

2022.6.23

2 files

2022.6.22

2 files

2022.5.13

2 files

2021.9.19

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page