Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

repository-preservation/lcmap-client-py

Repository files navigation

lcmap-client-py Build StatusPyPI Project

LCMAP REST Service Client for Python

System Requirements

Centos 7 - Python 2.7

$ sudo yum install -y  python-pip python-devel \
                       gcc-c++ gcc-gfortran \
                       gdal-devel gdal

Centos 7 - Python 3.4

$ sudo yum install -y python3-pip python3-devel \
                      gcc-c++ gcc-gfortran \
                      gdal-devel gdal

Ubuntu 14.04 - Python 2.7

$ sudo apt-get -y install python-pip python-dev \
                          libgdal1h libgdal1-dev \
                          gfortran g++

Installing

$ pip install lcmap_client

If /tmp is mounted noexec specify a build directory with rwx permissions:

$ pip install -b some_dir lcmap_client

Configuration

Client library configuration is done using a Config/INI file. For more information, visit the client documentation link below -- in particular, the section "The Client Libraries" > "Configuration".

Testing

$ python setup.py test

Documentation

Full documentation for all LCMAP clients is available here:

Note that per-client usage and example code is selectable via tabs in the upper-right of that page.

Example Usage

Starting:

$ cd lcmap-client-py
$ tox -e py34-shell
>>> from lcmap_client import Client
>>> client = Client()
>>> result = client.models.samples.os_process.run(year=2017, delay=10)
>>> result.follow_link()

CLI Tools

Run a query:

$  lcmap query rod --x -1789425 --y 3073665 --t1 2010-01-01 --t2 2015-01-01

Execute the same query against the CCDC model:

$  lcmap model ccdc --x -1789425 --y 3073665 --t1 2010-01-01 --t2 2015-01-01 \
        --row=2241 --col=1231 --out-dir="stdout" --scene-list="stdin"

To see what's available:

$ lcmap --help

And for help on the subcommands:

$ lcmap query --help
$ lcmap query rod --help

Development

TBD

License

Copyright © 2015 United States Government

NASA Open Source Agreement, Version 1.3.

About

LCMAP REST Service Client (Python) [alpha 0.5.0]

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •