{"id":24093213,"url":"https://github.com/umd-lib/umd-oaipmh-server","last_synced_at":"2025-07-26T02:33:28.852Z","repository":{"id":164090761,"uuid":"639481250","full_name":"umd-lib/umd-oaipmh-server","owner":"umd-lib","description":"OAI-PMH Server for Fedora","archived":false,"fork":false,"pushed_at":"2025-01-22T19:22:59.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-07-05T03:13:03.494Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umd-lib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-11T14:37:10.000Z","updated_at":"2024-09-16T18:43:36.000Z","dependencies_parsed_at":"2024-12-03T23:23:37.831Z","dependency_job_id":"7ca53ddb-93ff-4d2b-baf4-c7ad0a86731e","html_url":"https://github.com/umd-lib/umd-oaipmh-server","commit_stats":null,"previous_names":["umd-lib/umd-oaipmh-server"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/umd-lib/umd-oaipmh-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-oaipmh-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-oaipmh-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-oaipmh-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-oaipmh-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umd-lib","download_url":"https://codeload.github.com/umd-lib/umd-oaipmh-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-oaipmh-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267107637,"owners_count":24037296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-10T09:26:07.257Z","updated_at":"2025-07-26T02:33:28.822Z","avatar_url":"https://github.com/umd-lib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# umd-oaipmh-server\n\nOAI-PMH Server for Fedora\n\n## Purpose\n\nThis is an [OAI-PMH] server for publishing metadata records from a Fedora\nrepository. It uses a Solr index for general queries, and connects\ndirectly to Fedora to retrieve the full metadata record for an item.\n\n### add-handles\n\nIn addition to OAI-PMH functionality, this repository provides an\n\"add-handles\" script that takes a CSV file generated by the  Plastron \"export\"\ncommand and creates a handle for each item using the configured\n\"umd-handle\" server, returning a CSV file with the created handles\nsuitable for import into Fedora. See [docs/add_handles.md][add-handles]\nfor more information.\n\n## Development Environment\n\nPython version: 3.11\n\n### Installation\n\n```bash\ngit clone git@github.com:umd-lib/umd-oaipmh-server.git\ncd umd-oaipmh-server\npyenv install --skip-existing $(cat .python-version)\npython -m venv .venv --prompt umd-oaipmh-server-py$(cat .python-version)\npip install -r requirements.test.txt -e .\n```\n\n### Configuration\n\nCreate a `.env` file with the following contents:\n\n```bash\n# OAI-PMH repository administrator email address\nADMIN_EMAIL=...\n# domain name for the target Fedora repo\nOAI_NAMESPACE_IDENTIFIER=...\n# OAI-PMH repository name\nOAI_REPOSITORY_NAME=...\n# earliest datestamp of items in this repository\nEARLIEST_DATESTAMP=2014-01-01T00:00:00Z\n# JWT SECRET for the server to generate its own token to access the Fedora repository\nJWT_SECRET=...\n# URL to the Solr core to search\nSOLR_URL=...\n# enable debugging and hot reloading when run via \"flask run\"\nFLASK_DEBUG=1\n# HTTP Proxy for the minted handles\n# e.g (https://hdl.handle.net/)\n# Don't forget to include the / at the end\nHANDLE_PROXY_PREFIX=...\n# Type of Dataprovider (Fedora, Avalon)\nDATA_PROVIDER_TYPE=...\n```\n\nAnd, depending on whether you want to start an avalon or fedora server, rename the relevant solr_conf\n(solr_conf.yml.fedora or solr_conf.yml.avalon) file for whichever server you want to start.\n\nFor full configuration information, see\n[Configuration](docs/configuration.md).\n\n### Running\n\nTo run the application in debug mode, with hot code reloading:\n\n```bash\nflask --app \"oaipmh.web:app(solr_config_file='solr_conf.yml', data_provider_type='Fedora')\" run\n```\n\nThe OAI-PMH service will be available at \u003chttp://localhost:5000/oai/api\u003e,\nwith a simple HTML landing page at \u003chttp://localhost:5000/oai\u003e.\n\nTo change the port, add a `BASE_URL` environment variable to the `.env` file:\n\n```bash\n# set when using a URL and/or port other than\n# the defaults (\"localhost\" and \"5000\")\nBASE_URL=http://localhost:8000/oai/api\n```\n\nAnd add `-p {port number}` to the `flask` command:\n\n```bash\n# for example, to run on port 8000\nflask --app \"oaipmh.web:create_app(solr_config_file='solr_conf.yml', data_provider_type='Fedora')\" run -p 8000\n```\n\n### Testing\n\nThis project uses the [pytest] testing framework. To run the full\n[test suite](tests):\n\n```bash\npytest\n```\n\nTo run the test suite with coverage information from [pytest-cov]:\n\n```bash\npytest --cov src --cov-report term-missing\n```\n\nThis project also uses [pycodestyle] as a style checker and linter:\n\n```bash\npycodestyle src\n```\n\nConfiguration of pycodestyle is found in the [tox.ini](tox.ini) file.\n\n### Deploying using Docker\n\nBuild the image:\n\n```bash\ndocker build -t docker.lib.umd.edu/oaipmh-server:latest .\n```\n\nIf you need to build for multiple architectures (e.g., AMD and ARM), you\ncan use `docker buildx`. This assumes you have a builder named \"local\"\nconfigured for use with your docker buildx system, and you are logged in\nto a Docker repository that you can push images to:\n\n```bash\ndocker buildx build --builder local --platform linux/amd64,linux/arm64 \\\n    -t docker.lib.umd.edu/oaipmh-server:latest --push .\n\n# then pull the image so it is available locally\ndocker pull docker.lib.umd.edu/oaipmh-server:latest\n```\n\nRun the container:\n\n```bash\ndocker run -d -p 5000:5000 \\\n    -e ADMIN_EMAIL=... \\\n    -e OAI_NAMESPACE_IDENTIFIER=... \\\n    -e OAI_REPOSITORY_NAME=... \\\n    -e EARLIEST_DATESTAMP=2014-01-01T00:00:00Z \\\n    -e JWT_SECRET=... \\\n    -e SOLR_URL=... \\\n    docker.lib.umd.edu/oaipmh-server:latest\n```\n\nIf you created a `.env` file (see [Configuration](#configuration)), you\ncan run the Docker image using that file.\n\n```bash\ndocker run -d -p 5000:5000 \\\n    --env-file .env \\\n    docker.lib.umd.edu/oaipmh-server:latest\n```\n\nNote: To refer to services running on the host machine (e.g., Solr) in the\nconfiguration, you will need to use the hostname `host.docker.internal`\ninstead of `localhost`.\n\n[OAI-PMH]: https://www.openarchives.org/pmh/\n[pytest]: https://docs.pytest.org/en/7.3.x/\n[pytest-cov]: https://pypi.org/project/pytest-cov/\n[pycodestyle]: https://pycodestyle.pycqa.org/en/latest/\n[add-handles]: docs/add_handles.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fumd-oaipmh-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumd-lib%2Fumd-oaipmh-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fumd-oaipmh-server/lists"}