Skip to main content

Dead-Simple SDMX Server

Project description

Status badge for the "pytest" continuous testing workflow

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

  1. 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.

  2. 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).

  3. Run:

    uvicorn --factory dsss:build_app

    The output will include a line like:

  4. 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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dsss-0.1.0b1.tar.gz (31.7 kB view hashes)

Uploaded Source

Built Distribution

dsss-0.1.0b1-py3-none-any.whl (32.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page