# \[IGN-5244\]Persist Python Class Object

**URL:** <https://forum.inductiveautomation.com/t/ign-5244-persist-python-class-object/30498>\
**Category:** Ignition\
**Created:** [December 6, 2019, 5:37pm UTC](https://forum.inductiveautomation.com/t/ign-5244-persist-python-class-object/30498 "2019-12-06T17:37:15Z")\
**Posts on this page:** 1\
**Showing post:** 43

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 23, 2023, 9:32pm UTC](https://forum.inductiveautomation.com/t/ign-5244-persist-python-class-object/30498/43 "2023-09-23T21:32:00Z")

</div>

Progress on this and related topics, via the new `BindableVarMap` objects now available in my Simulation Aids module:

> [@Automation Professionals' Integration Toolkit Module](https://forum.inductiveautomation.com/t/automation-professionals-simulation-aids-v2/74934/78):
>
> Ok. Beta release with a bunch of new features. For Ignition v8.1+: s\>v2.0.14.232662056 New Expression Functions since v2.0.13: globalVarMap(key) sessionVarMap() pageVarMap() viewVarMap() mungeColumnName(name) unQualify(object) New Scripting Functions since v2.0.13: system.util.globalVarMap(key) system.util.simAidsCtx() now system.util.toolkitCtx() system.util.indirectAction(functionName, proxyFor, projectName={current}) system.perspective.sessionVarMap(…) system.perspective.pageVarMap(…) …

JVM persistent objects are available with `globalVarMap()`, similar to but distinct from `system.util.getGlobals()`, available in in both scripting and expression bindings. Scripts can **notify corresponding bindings** via a `.refresh()` method.

Perspective session, page, and view associated maps are available in both scripts and expressions as for global variable maps, but these maps are weakly linked and are automatically discarded when the association is broken. As yes, expression refresh notifications also work with these.

Edit:

Also note this long-standing script library bug that can affect persistent object setup:

> [@Project Library Script Initialization Races](https://forum.inductiveautomation.com/t/project-library-script-initialization-races/98636):
>
> Are you annoyed by pseudo-random breakage in Ignition project library scripting? Odd top-level constants being garbled, or operations in the top level that have side effects running twice? Or more? Not happening much, but always around project edits, and sometimes even on gateway restart? Yeah, me too. frowning_face Poking around under the hood back in the spring, for a module development task, I ran across some problematic IA bytecode and pinged some people. But it went nowhere, as I co…

---

_[View the full topic](https://forum.inductiveautomation.com/t/ign-5244-persist-python-class-object/30498)._
