Skip to content

Implicit Python Application Mode Pattern #1134

Open
@nbauernfeind

Description

@nbauernfeind

Devin and I believe that we can offer an alternative python application mode experience that would work as follows:

from deephaven import TableTools
from deephaven import Application

def demo_implicit():
  print("Running Implicit Demo.")
  size_imp = 42
  hello_imp = TableTools.emptyTable(size)
  world_imp = TableTools.timeTable("00:00:01")

Application.initialize_implicitly(demo_implicit)

Here hello_imp and world_imp would both be exported as Fields, but none of the variables would leak to the QueryScope.

Note that this is in contrast to the other "pretty" python application mode approach:

from deephaven import TableTools
from deephaven import Application, ApplicationState

def demo_app(app: ApplicationState):
  print("Running Strict App Demo.")
  size = 42
  app.setField("hello", TableTools.emptyTable(size))
  app.setField("world", TableTools.timeTable("00:00:01"))

Application.initialize(demo_app)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions