Primitives

Classes

Number(obj)

Abstract base class for numeric Proxytypes.

Primitive(obj)

Proxy wrapper around a Python primitive type.

Int(obj)

Proxy int

Float(obj)

Proxy float

Bool(obj)

Proxy bool

Str(obj)

Proxy str

NoneType(obj)

Proxy type(None)

Any(value)

Generic Proxytype that supports almost all operations.

class Number(obj)[source]

Abstract base class for numeric Proxytypes.

Use the concrete subtypes Int and Float instead; Number cannot be instantiated and should only be used for isinstance() checks.

You can explicitly construct one numeric type from another, performing a cast (Int(Float(4.2))), but one numeric type will not implicitly promote to another (Int._promote(Float(4.2)) will fail).

Methods

compute([geoctx, timeout, block, …])

Compute this proxy object and wait for its result.

publish([name, description, client])

Publish this proxy object as a Workflow.

compute(geoctx=None, timeout=None, block=True, progress_bar=None, channel=None, client=None, **params)

Compute this proxy object and wait for its result.

Parameters
  • geoctx (scenes.geocontext.GeoContext, GeoContext, or None) – The GeoContext parameter under which to run the computation. Almost all computations will require a GeoContext, but for operations that only involve non-geospatial types, this parameter is optional.

  • timeout (int, optional) – The number of seconds to wait for the result, if block is True. Raises TimeoutError if the timeout passes.

  • block (bool, default True) – If True (default), block until the job is completed, or timeout has passed. If False, immediately returns a Job (which has already had execute called).

  • progress_bar (bool, default None) – Whether to draw the progress bar. If None (default), will display a progress bar in Jupyter Notebooks, but not elsewhere. Ignored if block==False.

  • channel (str or None, optional) –

    Channel name to submit the Job to. If None, uses the default channel for this client (descarteslabs.workflows.__channel__).

    Channels are different versions of the backend, to allow for feature changes without breaking existing code. Not all clients are compatible with all channels. This client is only guaranteed to work with its default channel, whose name can be found under descarteslabs.workflows.__channel__.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

  • **params (Proxytype) – Parameters under which to run the computation.

Returns

Appropriate Python object representing the result, either as a plain Python type, or object from descarteslabs.workflows.results.

Return type

result

publish(name='', description='', client=None)

Publish this proxy object as a Workflow.

Parameters
  • name (str, default "") – Name for the new Workflow

  • description (str, default "") – Long-form description of this Workflow. Markdown is supported.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

Returns

workflow – The saved Workflow object. workflow.id contains the ID of the new Workflow.

Return type

Workflow

class Primitive(obj)[source]

Proxy wrapper around a Python primitive type.

Do not use Primitive directly; instead, use one of the built-in subtypes (Int, Str, etc.)

Methods

compute([geoctx, timeout, block, …])

Compute this proxy object and wait for its result.

publish([name, description, client])

Publish this proxy object as a Workflow.

compute(geoctx=None, timeout=None, block=True, progress_bar=None, channel=None, client=None, **params)

Compute this proxy object and wait for its result.

Parameters
  • geoctx (scenes.geocontext.GeoContext, GeoContext, or None) – The GeoContext parameter under which to run the computation. Almost all computations will require a GeoContext, but for operations that only involve non-geospatial types, this parameter is optional.

  • timeout (int, optional) – The number of seconds to wait for the result, if block is True. Raises TimeoutError if the timeout passes.

  • block (bool, default True) – If True (default), block until the job is completed, or timeout has passed. If False, immediately returns a Job (which has already had execute called).

  • progress_bar (bool, default None) – Whether to draw the progress bar. If None (default), will display a progress bar in Jupyter Notebooks, but not elsewhere. Ignored if block==False.

  • channel (str or None, optional) –

    Channel name to submit the Job to. If None, uses the default channel for this client (descarteslabs.workflows.__channel__).

    Channels are different versions of the backend, to allow for feature changes without breaking existing code. Not all clients are compatible with all channels. This client is only guaranteed to work with its default channel, whose name can be found under descarteslabs.workflows.__channel__.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

  • **params (Proxytype) – Parameters under which to run the computation.

Returns

Appropriate Python object representing the result, either as a plain Python type, or object from descarteslabs.workflows.results.

Return type

result

publish(name='', description='', client=None)

Publish this proxy object as a Workflow.

Parameters
  • name (str, default "") – Name for the new Workflow

  • description (str, default "") – Long-form description of this Workflow. Markdown is supported.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

Returns

workflow – The saved Workflow object. workflow.id contains the ID of the new Workflow.

Return type

Workflow

class Int(obj)[source]

Proxy int

Methods

compute([geoctx, timeout, block, …])

Compute this proxy object and wait for its result.

publish([name, description, client])

Publish this proxy object as a Workflow.

compute(geoctx=None, timeout=None, block=True, progress_bar=None, channel=None, client=None, **params)

Compute this proxy object and wait for its result.

Parameters
  • geoctx (scenes.geocontext.GeoContext, GeoContext, or None) – The GeoContext parameter under which to run the computation. Almost all computations will require a GeoContext, but for operations that only involve non-geospatial types, this parameter is optional.

  • timeout (int, optional) – The number of seconds to wait for the result, if block is True. Raises TimeoutError if the timeout passes.

  • block (bool, default True) – If True (default), block until the job is completed, or timeout has passed. If False, immediately returns a Job (which has already had execute called).

  • progress_bar (bool, default None) – Whether to draw the progress bar. If None (default), will display a progress bar in Jupyter Notebooks, but not elsewhere. Ignored if block==False.

  • channel (str or None, optional) –

    Channel name to submit the Job to. If None, uses the default channel for this client (descarteslabs.workflows.__channel__).

    Channels are different versions of the backend, to allow for feature changes without breaking existing code. Not all clients are compatible with all channels. This client is only guaranteed to work with its default channel, whose name can be found under descarteslabs.workflows.__channel__.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

  • **params (Proxytype) – Parameters under which to run the computation.

Returns

Appropriate Python object representing the result, either as a plain Python type, or object from descarteslabs.workflows.results.

Return type

result

publish(name='', description='', client=None)

Publish this proxy object as a Workflow.

Parameters
  • name (str, default "") – Name for the new Workflow

  • description (str, default "") – Long-form description of this Workflow. Markdown is supported.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

Returns

workflow – The saved Workflow object. workflow.id contains the ID of the new Workflow.

Return type

Workflow

class Float(obj)[source]

Proxy float

Methods

compute([geoctx, timeout, block, …])

Compute this proxy object and wait for its result.

publish([name, description, client])

Publish this proxy object as a Workflow.

compute(geoctx=None, timeout=None, block=True, progress_bar=None, channel=None, client=None, **params)

Compute this proxy object and wait for its result.

Parameters
  • geoctx (scenes.geocontext.GeoContext, GeoContext, or None) – The GeoContext parameter under which to run the computation. Almost all computations will require a GeoContext, but for operations that only involve non-geospatial types, this parameter is optional.

  • timeout (int, optional) – The number of seconds to wait for the result, if block is True. Raises TimeoutError if the timeout passes.

  • block (bool, default True) – If True (default), block until the job is completed, or timeout has passed. If False, immediately returns a Job (which has already had execute called).

  • progress_bar (bool, default None) – Whether to draw the progress bar. If None (default), will display a progress bar in Jupyter Notebooks, but not elsewhere. Ignored if block==False.

  • channel (str or None, optional) –

    Channel name to submit the Job to. If None, uses the default channel for this client (descarteslabs.workflows.__channel__).

    Channels are different versions of the backend, to allow for feature changes without breaking existing code. Not all clients are compatible with all channels. This client is only guaranteed to work with its default channel, whose name can be found under descarteslabs.workflows.__channel__.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

  • **params (Proxytype) – Parameters under which to run the computation.

Returns

Appropriate Python object representing the result, either as a plain Python type, or object from descarteslabs.workflows.results.

Return type

result

publish(name='', description='', client=None)

Publish this proxy object as a Workflow.

Parameters
  • name (str, default "") – Name for the new Workflow

  • description (str, default "") – Long-form description of this Workflow. Markdown is supported.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

Returns

workflow – The saved Workflow object. workflow.id contains the ID of the new Workflow.

Return type

Workflow

class Bool(obj)[source]

Proxy bool

Methods

compute([geoctx, timeout, block, …])

Compute this proxy object and wait for its result.

publish([name, description, client])

Publish this proxy object as a Workflow.

compute(geoctx=None, timeout=None, block=True, progress_bar=None, channel=None, client=None, **params)

Compute this proxy object and wait for its result.

Parameters
  • geoctx (scenes.geocontext.GeoContext, GeoContext, or None) – The GeoContext parameter under which to run the computation. Almost all computations will require a GeoContext, but for operations that only involve non-geospatial types, this parameter is optional.

  • timeout (int, optional) – The number of seconds to wait for the result, if block is True. Raises TimeoutError if the timeout passes.

  • block (bool, default True) – If True (default), block until the job is completed, or timeout has passed. If False, immediately returns a Job (which has already had execute called).

  • progress_bar (bool, default None) – Whether to draw the progress bar. If None (default), will display a progress bar in Jupyter Notebooks, but not elsewhere. Ignored if block==False.

  • channel (str or None, optional) –

    Channel name to submit the Job to. If None, uses the default channel for this client (descarteslabs.workflows.__channel__).

    Channels are different versions of the backend, to allow for feature changes without breaking existing code. Not all clients are compatible with all channels. This client is only guaranteed to work with its default channel, whose name can be found under descarteslabs.workflows.__channel__.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

  • **params (Proxytype) – Parameters under which to run the computation.

Returns

Appropriate Python object representing the result, either as a plain Python type, or object from descarteslabs.workflows.results.

Return type

result

publish(name='', description='', client=None)

Publish this proxy object as a Workflow.

Parameters
  • name (str, default "") – Name for the new Workflow

  • description (str, default "") – Long-form description of this Workflow. Markdown is supported.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

Returns

workflow – The saved Workflow object. workflow.id contains the ID of the new Workflow.

Return type

Workflow

class Str(obj)[source]

Proxy str

Methods

capitalize()

center(width[, fillchar])

compute([geoctx, timeout, block, …])

Compute this proxy object and wait for its result.

contains(other)

count(sub)

decode()

encode()

endswith(suffix)

expandtabs([tabsize])

find(sub)

format(*args, **kwargs)

index(sub)

isalnum()

isalpha()

isdigit()

islower()

isspace()

istitle()

isupper()

join(iterable)

length()

ljust(width[, fillchar])

lower()

lstrip([chars])

partition(sep)

publish([name, description, client])

Publish this proxy object as a Workflow.

replace(old, new[, count])

rfind(sub)

rindex(sub)

rjust(width[, fillchar])

rpartition(sep)

rsplit([sep, maxsplit])

rstrip([chars])

split([sep, maxsplit])

splitlines()

startswith(prefix)

strip([chars])

swapcase()

title()

translate(table[, deletechars])

upper()

zfill(width)

capitalize()[source]
center(width, fillchar=' ')[source]
compute(geoctx=None, timeout=None, block=True, progress_bar=None, channel=None, client=None, **params)

Compute this proxy object and wait for its result.

Parameters
  • geoctx (scenes.geocontext.GeoContext, GeoContext, or None) – The GeoContext parameter under which to run the computation. Almost all computations will require a GeoContext, but for operations that only involve non-geospatial types, this parameter is optional.

  • timeout (int, optional) – The number of seconds to wait for the result, if block is True. Raises TimeoutError if the timeout passes.

  • block (bool, default True) – If True (default), block until the job is completed, or timeout has passed. If False, immediately returns a Job (which has already had execute called).

  • progress_bar (bool, default None) – Whether to draw the progress bar. If None (default), will display a progress bar in Jupyter Notebooks, but not elsewhere. Ignored if block==False.

  • channel (str or None, optional) –

    Channel name to submit the Job to. If None, uses the default channel for this client (descarteslabs.workflows.__channel__).

    Channels are different versions of the backend, to allow for feature changes without breaking existing code. Not all clients are compatible with all channels. This client is only guaranteed to work with its default channel, whose name can be found under descarteslabs.workflows.__channel__.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

  • **params (Proxytype) – Parameters under which to run the computation.

Returns

Appropriate Python object representing the result, either as a plain Python type, or object from descarteslabs.workflows.results.

Return type

result

contains(other)[source]
count(sub)[source]
decode()[source]
encode()[source]
endswith(suffix)[source]
expandtabs(tabsize=8)[source]
find(sub)[source]
format(*args, **kwargs)[source]
index(sub)[source]
isalnum()[source]
isalpha()[source]
isdigit()[source]
islower()[source]
isspace()[source]
istitle()[source]
isupper()[source]
join(iterable)[source]
length()[source]
ljust(width, fillchar=' ')[source]
lower()[source]
lstrip(chars=None)[source]
partition(sep)[source]
publish(name='', description='', client=None)

Publish this proxy object as a Workflow.

Parameters
  • name (str, default "") – Name for the new Workflow

  • description (str, default "") – Long-form description of this Workflow. Markdown is supported.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

Returns

workflow – The saved Workflow object. workflow.id contains the ID of the new Workflow.

Return type

Workflow

replace(old, new, count=-1)[source]
rfind(sub)[source]
rindex(sub)[source]
rjust(width, fillchar=' ')[source]
rpartition(sep)[source]
rsplit(sep=None, maxsplit=-1)[source]
rstrip(chars=None)[source]
split(sep=None, maxsplit=-1)[source]
splitlines()[source]
startswith(prefix)[source]
strip(chars=None)[source]
swapcase()[source]
title()[source]
translate(table, deletechars='')[source]
upper()[source]
zfill(width)[source]
class NoneType(obj)[source]

Proxy type(None)

Methods

compute([geoctx, timeout, block, …])

Compute this proxy object and wait for its result.

publish([name, description, client])

Publish this proxy object as a Workflow.

compute(geoctx=None, timeout=None, block=True, progress_bar=None, channel=None, client=None, **params)

Compute this proxy object and wait for its result.

Parameters
  • geoctx (scenes.geocontext.GeoContext, GeoContext, or None) – The GeoContext parameter under which to run the computation. Almost all computations will require a GeoContext, but for operations that only involve non-geospatial types, this parameter is optional.

  • timeout (int, optional) – The number of seconds to wait for the result, if block is True. Raises TimeoutError if the timeout passes.

  • block (bool, default True) – If True (default), block until the job is completed, or timeout has passed. If False, immediately returns a Job (which has already had execute called).

  • progress_bar (bool, default None) – Whether to draw the progress bar. If None (default), will display a progress bar in Jupyter Notebooks, but not elsewhere. Ignored if block==False.

  • channel (str or None, optional) –

    Channel name to submit the Job to. If None, uses the default channel for this client (descarteslabs.workflows.__channel__).

    Channels are different versions of the backend, to allow for feature changes without breaking existing code. Not all clients are compatible with all channels. This client is only guaranteed to work with its default channel, whose name can be found under descarteslabs.workflows.__channel__.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

  • **params (Proxytype) – Parameters under which to run the computation.

Returns

Appropriate Python object representing the result, either as a plain Python type, or object from descarteslabs.workflows.results.

Return type

result

publish(name='', description='', client=None)

Publish this proxy object as a Workflow.

Parameters
  • name (str, default "") – Name for the new Workflow

  • description (str, default "") – Long-form description of this Workflow. Markdown is supported.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

Returns

workflow – The saved Workflow object. workflow.id contains the ID of the new Workflow.

Return type

Workflow

class Any(value)[source]

Generic Proxytype that supports almost all operations.

Methods

compute([geoctx, timeout, block, …])

Compute this proxy object and wait for its result.

contains(other)

Contains is equivalient to the Python in operator.

length()

Length is equivalent to the Python len operator.

publish([name, description, client])

Publish this proxy object as a Workflow.

compute(geoctx=None, timeout=None, block=True, progress_bar=None, channel=None, client=None, **params)

Compute this proxy object and wait for its result.

Parameters
  • geoctx (scenes.geocontext.GeoContext, GeoContext, or None) – The GeoContext parameter under which to run the computation. Almost all computations will require a GeoContext, but for operations that only involve non-geospatial types, this parameter is optional.

  • timeout (int, optional) – The number of seconds to wait for the result, if block is True. Raises TimeoutError if the timeout passes.

  • block (bool, default True) – If True (default), block until the job is completed, or timeout has passed. If False, immediately returns a Job (which has already had execute called).

  • progress_bar (bool, default None) – Whether to draw the progress bar. If None (default), will display a progress bar in Jupyter Notebooks, but not elsewhere. Ignored if block==False.

  • channel (str or None, optional) –

    Channel name to submit the Job to. If None, uses the default channel for this client (descarteslabs.workflows.__channel__).

    Channels are different versions of the backend, to allow for feature changes without breaking existing code. Not all clients are compatible with all channels. This client is only guaranteed to work with its default channel, whose name can be found under descarteslabs.workflows.__channel__.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

  • **params (Proxytype) – Parameters under which to run the computation.

Returns

Appropriate Python object representing the result, either as a plain Python type, or object from descarteslabs.workflows.results.

Return type

result

contains(other)[source]

Contains is equivalient to the Python in operator.

Parameters

other (Proxytype) – A Proxytype or type that can be promoted to a Proxytype

Returns

A Boolean ProxyType

Return type

Boolean

length()[source]

Length is equivalent to the Python len operator.

Returns

An Int proxytype

Return type

Int

publish(name='', description='', client=None)

Publish this proxy object as a Workflow.

Parameters
  • name (str, default "") – Name for the new Workflow

  • description (str, default "") – Long-form description of this Workflow. Markdown is supported.

  • client (workflows.client.Client, optional) – Allows you to use a specific client instance with non-default auth and parameters

Returns

workflow – The saved Workflow object. workflow.id contains the ID of the new Workflow.

Return type

Workflow