UserSpace#
- class UserSpace(_impl)[source]#
Editable space serving as a container for cells, child spaces, and references.
UserSpace is the primary space type that users create and modify directly. It serves as a static, editable container that can hold:
Cellsobjects (formulas with cached values)Child UserSpace objects (nested spaces)
References to external objects (data, modules, etc.)
UserSpaces can be parameterized with a formula, which enables the creation of
ItemSpaceinstances dynamically when accessed with arguments.UserSpaces support inheritance through base spaces, allowing cells and references to be inherited and overridden in derived spaces.
Key Characteristics:
Editable: Cells, spaces, and references can be added, modified, or removed
Static: Exists independently of any parameter values
Named: Has a fixed name within its parent’s namespace
Inheritable: Can serve as a base for other UserSpaces
See also
DynamicSpace: Read-only spaces created dynamicallyItemSpace: Parameterized instances of spacesnew_space(): Create a new UserSpace in a modelChanged in version 0.0.23: Renamed from StaticSpace to UserSpace
Basic properties#
Name of the object. |
|
Dotted name of the object. |
|
Documentation string |
|
Whether a cells can have None as its value. |
|
The model this object belongs to. |
|
The parent of this object. |
|
Read-only mapping of reference names to their values. |
|
Check whether this space has parameters defined. |
|
|
Set property |
An object whose |
Space operations#
Inheritance operations#
List of base spaces from which this space inherits. |
|
|
Add base spaces for inheritance. |
|
Remove base spaces from inheritance hierarchy. |
Child Space operations#
Read-only mapping of names to child |
|
Read-only mapping of names to child |
|
A mapping associating names to named spaces. |
|
|
Set the current space to Space |
|
Create a child space from an module. |
|
Create a child space. |
|
Create spaces from from a comma-separated values (csv) file. |
|
Create a child space from an Excel range. |
|
Create a child space from an module. |
|
Create child spaces from Pandas DataFrame or Series. |
|
Reload the source module and update the formulas. |
Clear all cell values and delete all ItemSpaces recursively. |
Child Cells operations#
Read-only mapping of cells names to |
|
|
Create a new |
|
Create cells from a comma-separated values (csv) file. |
|
Create multiple cells from an Excel range. |
|
Create multiple cells from functions defined in a Python module. |
|
Create new cells from Pandas Series or DataFrame object. |
|
Create a cells from a module. |
|
Clear values from cells with flexible control over scope. |
Sort child cells alphabetically by name. |
Reference operations#
|
Set a reference with explicit mode control. |
|
Set references in absolute mode. |
|
Set references in relative mode. |
|
Creates a Reference to an Excel range |
|
Create a Reference bound to a pandas DataFrame or Series associating a new |
|
Assigns a user module to a Reference associating a new |
ItemSpace operations#
Read-only mapping of parameter arguments to |
|
Tuple of parameter names for this space, or None if not parameterized. |
|
The formula that defines parameter behavior for this space. |
|
|
Set the parameter formula for this space. |
Delete the parameter formula from this space. |
|
Delete all |
|
|
Delete a child |
|
Return a Node object for the given arguments. |
|
Return a list of predecessors of a cell. |
|
Return a list of successors of a cell. |
|
Return a list of the precedents. |