Python 3 Flask application to generate and serve a sitemap.xml file for ArchivesSpace public interface using the ArchivesSpace API and the ArchivesSnake Library.
- Python 3
# create a .env file (then manually update environment variables)
cp .env-template .env
# install requirements
pyenv install --skip-existing $(cat .python-version)
python -m venv .venv --prompt "$(basename "$PWD")-py$(cat .python-version)"
source .venv/bin/activate
pip install -r requirements.txt
# run the app with Flask
flask run
docker build -t aspace-sitemap .
docker run -it --rm -p 5000:5000 --env-file=.env --read-only aspace-sitemap
This will start the webapp listening on the default port 5000 on localhost (127.0.0.1), and running in Flask's debug mode.
Root endpoint (just returns {status: ok}
to all requests):
http://localhost:5000/
/ping endpoint (just returns {status: ok}
to all requests):
http://localhost:5000/ping
/sitemap.py endpoint: http://localhost:5000/sitemap.py
See the LICENSE file for license rights and limitations.