Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

27 total results found

Initialize API

Developer Manual Python - API Setup

This examples shows how to create a new instance of the Voxel Farm client Python API. # Import the Voxel Farm Client Library from voxelfarm import voxelfarmclient # The URL for the Voxel Space API vf_api_url = 'https://vf-api.voxelspace.com' # Creat...

Provide Credentials

Developer Manual Python - API Setup

This example shows how to provide credentials for API authentication. # Set credentials vf_token = os.getenv('VF_USER_TOKEN') if (vf_token!=None): vf.token=vf_token You can copy the token from your profile in the Developer tab, as shown below:

Specify an HTTP proxy

Developer Manual Python - API Setup

This example shows how to specify an HTTP proxy to be used in all HTTP calls made by the API. # Use a proxy to debug HTTP requests using Fiddler or similar proxies = {   "http": os.getenv('YOUR_PROXY_URL'), } # Set the proxy to debug HTTP calls ...

Get CRS from project

Developer Manual Python - API Setup

This example shows how to retrieve the project's CRS (Coordinate Reference System). # Get the coordinate system given project ID result = vf.get_project_crs(project) if not result.success:     print(result.error_info)     exit() crs = result.cr...

Run Process Lambda

Developer Manual Python - Process Lambdas

This example runs a lambda process in the platform: result = vf.create_process_entity( project=projectId, type=vf.entity_type.Process, name="Generate Tetra Model " + strand, fields={ 'file_...

Read Process Results

Developer Manual Python - Process Lambdas

This example shows how to read the results of a Process Lambda execution. # The "project" variable contains the Project ID # The "process_id" variable contains the ID for the report entity csvdata = vf.get_file(project, process_id, 'my_result_data.csv')

Initialize Process Lambda

Developer Manual Python - Process Lambdas

The following example shows how to obtain the lambda_host interface: from voxelfarm import process_lambda lambda_host = process_lambda.process_lambda_host()

Read inputs of Process Lambda

Developer Manual Python - Process Lambdas

The following example shows how to read inputs from a process lambda program: from voxelfarm import process_lambda lambda_host = process_lambda.process_lambda_host() mesh_entity = lambda_host.input_entity("mesh_entity_id", "Entity", vf.type.voxel_mesh) s...

Downloading files in Process Lambda

Developer Manual Python - Process Lambdas

This example shows how to download all files attached to an entity: from voxelfarm import process_lambda lambda_host = process_lambda.process_lambda_host() ml_files = lambda_host.download_entity_files(ml_entity)

Getting temp folder in Process Lambda

Developer Manual Python - Process Lambdas

This example shows how to get the path to the large capacity temp folder used for temporary storage: from voxelfarm import process_lambda lambda_host = process_lambda.process_lambda_host() scrap_folder = lambda_host.get_scrap_folder()

Attach file to Process Lambda

Developer Manual Python - Process Lambdas

The following example shows how to attach a file from the temporary drive to the running process lambda entity: from voxelfarm import process_lambda lambda_host = process_lambda.process_lambda_host() floor = os.path.join(scrap, 'tetra_mesh_floor.obj') la...

Log from Process Lambda

Developer Manual Python - Process Lambdas

The following example shows how to send a new line to the processing log: from voxelfarm import process_lambda lambda_host = process_lambda.process_lambda_host() lambda_host.log('My log message here)  

Set exit code for Process Lambda

Developer Manual Python - Process Lambdas

The following example shows how to set the exit code for a Process Lambda: from voxelfarm import process_lambda lambda_host = process_lambda.process_lambda_host() lambda_host.set_exit_code(0)  

Create Version from Blob Upload

Developer Manual Python - Workflow Interface

This example shows how to create a new version for a product by uploading files to a designated workflow blob drop-in: import os from azure.storage.blob import BlobServiceClient from io import BufferedReader from io import BytesIO import json CONTAINER...

Workflow Definition

Developer Manual Python - Workflow Interface

# This code runs inside the Voxel Farm platform # Import the workflow lambda api from voxelfarm import workflow_lambda # Also import the voxelfarm client from voxelfarm import voxelfarmclient # Define the workflow callback functions def receive_dat...

Read a Product property

Developer Manual Python - Workflow Interface

The following example reads the value of a property for a given product: # Import voxel farm client and workflow lambda from voxelfarm import voxelfarmclient from voxelfarm import workflow_lambda # Obtain the workflow_api interface workflow_api = workf...

Read parameters as DataFrame

Developer Manual Python - Workflow Interface

The following example loads a DataFrame for a provided parameter product in the workflow: # Import voxel farm client and workflow lambda from voxelfarm import voxelfarmclient from voxelfarm import workflow_lambda # Obtain the workflow_api interface wor...

Search Time Series

Developer Manual Python - Workflow Interface

The following code performs a search in the Time Series database: data_frame = vf.search_time_series( spatial_id="Z602_404_812_408_ALH_5", object_id="CRUSHER3", property="DRY_TONNES", # An array of two ISO8601 dates timespan=["2017-01...

Get Time Series Data

Developer Manual Python - Workflow Interface

This example shows how to retrieve event data from Time Series for an array of time series identifier: timeseries_ids = [ { "spatialID": "B101_408_807_408_BAH_14", "objectID": "CRUSHER3", "property": "DRY_TONNES", }, ...

Create Report

Developer Manual Python - Workflow Interface

The following example creates a report by running a lambda Report function: result = voxelfarm_workflow.create_report(vf, request, 'pending_reports', 'Survey Volume Difference', 'lambdas/surface-volume-difference.py', region, 4, { 'previo...