Skip to main content

api for IMDC's OSS server

Project description

OSS_API

Allows to script the creation of scenarios and uploading of layers to OSS for displaying in synapps.

installation

pip install git+https://IMDCdocker:#######@gitlab.com:imdc/packages/oss_api

command line interface

  1. configure the project id: oss configure -p 42
  2. create a scenario: oss createScenario -n "new scenario" # scenario_id = e.g. 108
  3. Upload a *.tif / *.shp file: oss uploadLayer -i 108 -f D:\shapefile.shp -s shapefile.sld -n "new layer" -g Group1

python interface

from oss_api import configure, createScenario, uploadLayer
import os

configure(project=42)
scen = createScenario(name="Testing new scenario")

layers = [r"D:\dev\testdata\subcatchments.shp", r"D:\dev\testdata\dem.tif"]

for idx, layer in enumerate(layers):
    uploadLayer(scenario=scen, name=os.path.basename(layer), filename=layer, sld="polygon", group="Group+%d"%idx)

Project details


Download files

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

Files for oss-api, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size oss_api-0.0.4.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View
Filename, size oss_api-0.0.4-py3-none-any.whl (8.3 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page