This project offers Python scripts for interacting with the EZID API to create and verify Digital Object Identifiers (DOIs).
Setup
- Clone the Repository: If you haven’t already, clone the EZID API repository.
- Configure Credentials: Create a
.envfile in the project root with yourEZID_USERNAMEandEZID_PASSWORD. This file is Git-ignored for security. - Install Dependencies: Use
uvto set up a virtual environment and install dependencies fromrequirements.txt(uv venvthenuv pip install -r requirements.txt).
Usage
- Create a Test DOI: Run
uv run python create_doi.py. A successful creation will show a201 Createdresponse and the DOI identifier. - Check the Status of a Test DOI: Run
uv run python check_doi.pyto retrieve and display the DOI’s metadata.
Verification

You can verify the DOI in a web browser:
- View Metadata: Access
https://ezid.cdlib.org/id/doi:10.5072/FK2/TESTDOI123to see the raw metadata. - Resolve DOI: The DOI
https://doi.org/10.5072/FK2/TESTDOI123will redirect tohttps://www.google.comas configured.