environment
Attributes:
Name | Type | Description |
---|---|---|
env |
_Env
|
Global instance which stores the state of the cassini application. There should only be one instance of this object. |
env
module-attribute
env = _Env()
_Env
Essentially a global object that describes the state of the project for this interpreter.
As each notebook has its own interpreter, each notebook also has its own env that basically stores what the current
project is and what tier this ipynb
file corresponds to.
Attributes:
Name | Type | Description |
---|---|---|
project |
Project
|
reference to the current project object. Returns |
Warnings
This object is a singleton, so only one instance can exist at a time.
This object shouldn't be created directly, instead you should call project.env('...')
to set its value.
Source code in cassini/environment.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
o
property
o
Reference to current Tier object.
create_cache
create_cache()
Method for creating various caches throughout cassini.
the env instances keeps track of these, to allow them to be cleared cleanly during testing.
This is an internal feature.
Source code in cassini/environment.py
72 73 74 75 76 77 78 79 80 81 82 83 |
|
_reset
_reset()
Reset env instance to initial state. Used for testing.
project
, shareable_project
and caches
are cleared.
Source code in cassini/environment.py
85 86 87 88 89 90 91 92 93 94 95 |
|