web.helper Module

web_helper is a module that provides access to functions that helps to build new protocols and process ParaView data structure into web friendly ones.

class paraview.web.helper.Pipeline(name)[source]

Bases: object

Define a data structure that represent a pipeline as a tree. This provide also methods to get the data structure for the web environment

addNode(parent_id, node_id)[source]

Add node into the pipeline tree.


Clear the pipeline tree.


Create a tree structure of the pipeline with the current proxy state.


Remove a node from the pipeline tree.

paraview.web.helper.apply_domains(parentProxy, proxy_id)[source]

Handle bounds domain

paraview.web.helper.extractDomain(proxy, propertyName, xmlDomainElement)[source]
paraview.web.helper.extractProperty(proxy, xmlPropertyElement)[source]

Return ‘0’ if the given proxy has no Input otherwise will return the parent proxy id as a String.

paraview.web.helper.getProxyAsPipelineNode(id, view=None)[source]

Create a representation for that proxy so it can be used within a pipeline browser.


Return a json representation of the given proxy state.

Example of the state of the Clip filter

proxy_id: 234, ClipType: {

proxy_id: 235, Normal: [0,0,1], Origin: [0,0,0], InsideOut: 0




Return a json based structured based on the proxy XML.


Return the proxy that match the given proxy ID.


Create a tree structure of the given directory that will be understand by the pipelineBrowser widget. The provided path should not have a trailing ‘/’.

return {
children: [

{ name: ‘fileName.vtk’, path: ‘/full_path/to_file/fileName.vtk’ }, { name: ‘directoryName’, path: ‘/full_path/to_file/directoryName’, children: [] }



paraview.web.helper.updateProxyProperties(proxy, properties)[source]

Loop over the properties object and update the mapping properties to the given proxy.