Installation#

Dependencies#

sdmx is a pure Python package requiring Python 3.7 or higher, which can be installed:

sdmx also depends on:

  • pandas for data structures,

  • pydantic to implement the IM,

    • sdmx is currently not compatible with pydantic >= 1.8; see PR #62.

  • requests for HTTP requests, and

  • lxml for XML processing.

Optional dependencies for extra features#

Instructions#

  1. (optional) If using Anaconda, use source activate [ENV] to activate the environment in which to install sdmx.

  2. From the command line, issue:

    $ pip install sdmx1
    

    To also install optional dependencies, use commands like:

    $ pip install sdmx1[cache]             # just requests-cache
    $ pip install sdmx1[cache,docs,tests]  # all extras
    

From source#

  1. Download the latest code:

    • from PyPI,

    • from Github as a zip archive, or

    • by cloning the Github respository:

      $ git clone git@github.com:khaeru/sdmx.git
      
  2. In the package directory, issue:

    $ pip install --editable .
    

    or:

    $ python setup.py install
    

    To also install optional dependencies, use commands like:

    $ pip install --editable .[cache]             # just requests-cache
    $ pip install --editable .[cache,docs,tests]  # all extras
    

Note

The pip --editable flag is recommended for development, so that changes to your code are reflected the next time sdmx is imported.

Running tests#

Install from source, including the tests optional dependencies. Then, in the package directory, issue:

$ py.test

By default, tests that involve retrieving data over the network are skipped. To also run these tests, use:

$ py.test --remote-data

pytest offers many command-line options to control test invocation; see py.test --help or the documentation.