pycsw is an OGC CSW server implementation written in Python. Started in 2010 (more formally announced in 2011), pycsw allows for the publishing and discovery of geospatial metadata via numerous APIs (CSW 2/CSW 3, OpenSearch, OAI-PMH, SRU), providing a standards-based metadata and catalogue component of spatial data infrastructures. pycsw is Open Source, released under an MIT license, and runs on all major platforms (Windows, Linux, Mac OS X).
# Setup a virtual environment:
virtualenv pycsw && cd pycsw && . bin/activate
# Grab the pycsw source code:
git clone https://github.com/geopython/pycsw.git && cd pycsw
pip install -e . && pip install -r requirements-standalone.txt
# Create and adjust a configuration file:
cp default-sample.cfg default.cfg
vi default.cfg
# adjust paths in
# - server.home
# - repository.database
# set server.url to http://localhost:8000/
# Setup the database:
pycsw-admin.py -c setup_db -f default.cfg
# Load records by indicating a directory of XML files, use -r for recursive:
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/
# Run the server:
python ./pycsw/wsgi.py
# See that it works!
curl http://localhost:8000/?service=CSW&version=2.0.2&request=GetCapabilities
Everything is callable and configurable: