sightline.simon.util — Utility Functions

These functions are useful for Servable implementations to obtain information about their context and environment.

sightline.simon.util.current()

Returns the instance id of the current instance.

Return type

str

sightline.simon.util.current_config()

Returns the config passed into this instance.

Return type

Dict

sightline.simon.util.context_url()

Returns the URL of the Bucket containing the context for this Instance.

Return type

str

sightline.simon.util.current_context()

Downloads the context from the Bucket and returns a path to the context on disk.

Return type

str

sightline.simon.util.volume_path(id)

Returns the path to the mounted Volume with the provided id.

Return type

str

sightline.simon.util.s3_access_key()

Returns an access key that can be used to interface with Bucket.

Return type

str

sightline.simon.util.s3_secret_key()

Returns a secret key that can be used to interface with Bucket.

Return type

str

sightline.simon.util.simon_domain()

Returns the domain of the DTaaS node running this Instance.

Return type

str

sightline.simon.util.simon_url()

Returns a URL to the API of the DTaaS node running this instance.

Return type

str

sightline.simon.util.get_resource_stats()

Returns resource usage information about the Kubernetes cluster running this DTaaS node.

Return type

Dict

sightline.simon.util.access_token()

Returns an access token for this Instance that can be used to make DTaaS API calls.

Return type

str