Processes

Say Hello

class emu.processes.wps_say_hello.SayHello[source]

hello Say Hello (v1.5)

Just says a friendly Hello. Returns a literal string output with Hello plus the inputed name.

Parameters

name (string) – Please enter your name.

Returns

output – A friendly Hello from us.

Return type

string

References

Sleep

class emu.processes.wps_sleep.Sleep[source]

sleep Sleep Process (v1.0)

Testing a long running process, in the sleep. This process will sleep for a given delay or 10 seconds if not a valid value.

Parameters

delay (float) – Delay between every update

Returns

sleep_output – Sleep Output

Return type

string

References

Wordcounter

class emu.processes.wps_wordcounter.WordCounter[source]

wordcounter Word Counter (v1.0)

Counts words in a given text.

Parameters

text (text/plain) – URL pointing to a text document, for example “Alice in Wonderland”: http://www.gutenberg.org/cache/epub/19033/pg19033.txt

Returns

output – Word counter result

Return type

application/json

References

Counts occurrences of all words in a document.

Chomsky

class emu.processes.wps_chomsky.Chomsky[source]

chomsky Chomsky text generator (v1.0)

Generates a random chomsky text

Parameters

times (integer) – Generates a random chomsky text.

Returns

output – Chomsky text

Return type

text/plain

Generates a random chomsky text: http://code.activestate.com/recipes/440546-chomsky-random-text-generator/

CHOMSKY is an aid to writing linguistic papers in the style of the great master. It is based on selected phrases taken from actual books and articles written by Noam Chomsky. Upon request, it assembles the phrases in the elegant stylistic patterns that Chomsky is noted for. To generate n sentences of linguistic wisdom, type:

  • (CHOMSKY n) – for example

  • (CHOMSKY 5) generates half a screen of linguistic truth.

NCMeta

class emu.processes.wps_ncmeta.NCMeta[source]

ncmeta Return NetCDF Metadata (v4)

Return metadata from a netCDF dataset, either on file or an OpenDAP service.

Parameters
Returns

output – Metadata

Return type

text/plain

References

Returns metadata of a NetCDF file or OpenDAP resource.

ShowError

class emu.processes.wps_error.ShowError[source]

show_error Show a WPS Error (v1.0)

This process will fail intentionally with a friendly WPS error message.

Parameters
  • message (string) – Enter an error message that will be returned.

  • nice (boolean) – Be nice and show a friendly error message. Default: true

References

An example request:

http://localhost:5000/wps?
    version=1.0.0&
    service=wps&
    request=Execute&
    identifier=show_error&
    DataInputs=message=bad-day;nice=true

SimpleDryRun

class emu.processes.wps_dry_run.SimpleDryRun[source]

simple_dry_run Simple Dry Run (v1.0)

A dummy download as simple dry-run example.

Parameters
  • dry_run (boolean) – Dry run mode. Default false

  • count ({'None'}) – How many files do you want to download? The limit is 10

Returns

output – Output response

Return type

string

References

MultipleOutputs

class emu.processes.wps_multiple_outputs.MultipleOutputs[source]

multiple_outputs Multiple Outputs (v1.1)

Produces multiple files and returns a document with references to these files.

Parameters

count ({'None'}) – The number of generated output files.

Returns

  • output (application/metalink+xml; version=3.0) – Testing metalink v3 output

  • output_meta4 (application/metalink+xml; version=4.0) – Testing metalink v4 output

References

InOut

class emu.processes.wps_inout.InOut[source]

inout In and Out (v1.0)

Testing all WPS input and output parameters.

Parameters
  • string (string) – Enter a simple string.

  • int ({'1', '2', '3', '5', '7', '11'}) – Choose an integer number from allowed values.

  • float (float, optional) – Enter a float number.

  • boolean (boolean) – Make your choice :)

  • angle (angle) – Enter an angle [0, 360] :)

  • time (time) – Enter a time like 12:00:00

  • date (date) – Enter a date like 2012-05-01

  • datetime (dateTime) – Enter a datetime like 2016-09-02T12:00:00Z

  • string_choice ({'rock', 'paper', 'scissor'}) – Choose one item form list.

  • string_multiple_choice ({'sitting duck', 'flying goose', 'happy pinguin', 'gentle albatros'}, optional) – Choose one or two items from list.

  • int_range ({'None', 'None'}) – Choose number from range: 1-10 (step 1), 100-200 (step 10) (PyWPS Docs, AllowedValue Example)

  • any_value ({'None'}) –

    Enter any value. (PyWPS Docs)

  • ref_value ({'None'}) –

    Choose a referenced value (PyWPS Docs)

  • text (text/plain, optional) – Enter a URL pointing to a text document (optional) (Info)

  • dataset (application/x-netcdf, optional) – Enter a URL pointing to a NetCDF file (optional) (NetCDF Format)

Returns

  • string (string) – String

  • int (integer) – Integer

  • float (float) – Float

  • boolean (boolean) – Boolean

  • angle (angle) – Angle

  • time (time) – Time

  • date (date) – Date

  • datetime (dateTime) – DateTime

  • string_choice (string) – String Choice

  • string_multiple_choice (string) – String Multiple Choice

  • int_range (integer) – Integer Range

  • any_value (string) – Any Value

  • ref_value (string) – Referenced Value

  • text (text/plain) – Copy of input text file.

  • dataset (application/x-netcdf, text/plain) – Copy of input netcdf file.

  • bbox ([epsg:4326]) – Bounding Box

References

TODO: add literal input with value range[(0,100)] … see pywps doc