Dead-Simple SDMX Server
Project description
A rudimentary implementation of the SDMX REST web service standard.
This code is developed mainly as an aid for prototyping and testing other code that generates SDMX or relies on SDMX REST web services being available. It is not currently intended and likely not ready for production use.
Implementation
The package depends only on:
sdmx1 —for the SDMX Information Model, file formats, URLs, URNs, and more.
starlette —as a base web service framework.
It provides a Store class and subclasses for storing the structures and data to be served by an instance.
Usage
Run a local server
Install the package and uvicorn or another ASGI server:
git clone git@github.com:khaeru/dsss.git cd dsss pip install . uvicorn
The package is not yet published on PyPI.
Indicate the directory containing stored structures and data:
export DSSS_STORE=/path/to/store
This directory should be laid out as a StructuredFileStore (not yet documented).
Run:
uvicorn --factory dsss:build_app
The output will include a line like:
Running on http://127.0.0.1:8000/ (Press CTRL+C to quit)
Open a browser or use curl on the terminal to query this server:
curl -i http://127.0.0.1:5000/codelist/AGENCY/CL_FOO/latest/all?detail=full
Deploy to Google App Engine
Not currently supported.
Roadmap
For a 1.0 release, the code will tolerate all the queries possible using the SDMX REST cheat sheet. ‘Tolerate’ means that DSSS will respond to them with an SDMX-ML message, although possibly an SDMX-ML ErrorMessage with code 501 indicating the given feature(s) are not implemented.
Thus the code will:
Respect optional path parts. (done)
Return appropriate error messages for unavailable resources. (done)
Filter structures (partial implementation). (done)
Filter data (partial implementation). (done)
Return footer or other messages when the response is not fully filtered per path and query parameters. (done)
Provide documentation in the README for example deployment.
Include an initial test suite.
Support, and be tested on, Ubuntu Linux and Python ≥ 3.11
After 1.0, some features that will likely be added include:
Provide complete documentation.
Provide a complete test suite.
Provide logging.
Support all maintained Python versions, macOS, and Windows.
License
Copyright 2014–2024, dsss developers
Licensed under the GNU General Public License, Version 3.0 (the “License”); you may not use these files except in compliance with the License. You may obtain a copy of the License:
from the file LICENSE included with the source code, or
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.