Yes. pycsw can be deployed as both via traditional CGI or WSGI. You can also integrate pycsw via Django views, Pylons controllers or Flask routes.
How do I export my repository?
Use the pycsw-admin.py utility to dump the records as XML documents to a directory:
How do I add a custom metadata format?
pycsw provides a plugin framework in which you can implement a custom profile (see Profile Plugins)
How can I catalogue ‘sets’ of metadata?
Create a ‘parent’ metadata record from which all relevant metadata records (imagery, features) derive from via the same dc:source element of Dublin Core or apiso:parentIdentifier element of ISO 19139:2007. Then, do a GetRecords request, filtering on the identifier of the parent metadata record. Sample request:
The above query will search for all metadata records of the same apiso:parentIdentifier (identified by $identifier) within a given area of interest. The equivalent query can be done against dc:source with the same design pattern.
How can I handle transactions safely?
Transactions are handled by an IP-based authentication list which can be set in pycsw’s configuration (in manager.allowed_ips). Supported notations includes traditional IP address, wildcard, and CIDR.
How can I make CSW POST XML requests?
HTTP POST requests with XML are a bit different than the traditional HTTP POST approach (key=value). An HTTP client opens a connection to the server and sends XML directly. CSW implements HTTP POST in this manner with XML requests.
There are numerous ways to make this type of request, but here are a few:
Command line tools:
Does pycsw have a GUI/webapp/interface?
No. pycsw is a headless metadata catalog. Administration is via command line. For full metadata management, applications like CKAN, GeoNode and Open Data Catalog are built with pycsw inside and provide functionality to manage metadata via a GUI.
Use the pycsw-admin.pyutility and CSW’s Harvest operation against your own server:
How do I harvest huge OGC services without getting HTTP timeouts?
The CSW Harvest operation supports asynchronous processing via the ResponseHandler parameter. When specified, this parameter allows the request to continue while
returning the response to the client. The client will then be notified of completion via URI value of the ResponseHandler parameter being sent.
pycsw supports both FTP and SMTP-based ResponseHandler processing:
FTP (result gets pushed to ftp://host/result.xml):
SMTP (result gets emailed to firstname.lastname@example.org. See the docs for more information on configuring server.smtp_host):
Is pycsw customizable or extensible?
Yes. See our API docs for examples on deploying pycsw in a custom application/framework.
Why am I getting a ‘Connection refused’ error when connecting to pycsw?
Most CSW client tools (e.g. QGIS MetaSearch, OWSLib, etc.) derive the CSW URL from the GetCapabilities reponse XML, as opposed to using directly the URL you provide. Ensure that the server.url configuration value is set to ensure the URL to be advertised in the CSW Capabilities XML.
When doing a GetRecords why are there no results?
The default result type of a GetRecords response is a hit count, which does not show any records per se but provides a summary of the search result
To return actual records add resulttype=results to the GetRecords request.