Running Code Examples Directly from the Site
Running Code Examples Directly from the Site
September 8, 2026
The Python code examples on this site are now self-contained. Each script declares its own Python version and dependencies inline, using PEP 723 metadata, so you can run any example directly from this site with a single command, without a checkout or a setup step:
uv run https://opendata.lib.umd.edu/code/drum-oaipmh.pyThis example harvests metadata from DRUM, UMD’s institutional
repository. It uses uv, which reads each script’s
declared dependencies and runs it in a temporary environment. If you do not have
uv installed, run brew install uv or see the uv installation
guide.
Each service page embeds its own runnable examples, covering OAI-PMH, OpenSearch, the DSpace REST API, SRU, and JSON-LD.
