Get a named worker as an attribute. It returns a promise that resolves to the worker reference when ready. This allows accessing workers via dot notation as an alternative to bracket notation. ```python worker = await workers.my_worker ```
(self, name)
| 112 | return js.Reflect.get(_polyscript_workers, name) |
| 113 | |
| 114 | def __getattr__(self, name): |
| 115 | """ |
| 116 | Get a named worker as an attribute. It returns a promise that resolves |
| 117 | to the worker reference when ready. |
| 118 | |
| 119 | This allows accessing workers via dot notation as an alternative |
| 120 | to bracket notation. |
| 121 | |
| 122 | ```python |
| 123 | worker = await workers.my_worker |
| 124 | ``` |
| 125 | """ |
| 126 | return js.Reflect.get(_polyscript_workers, name) |
| 127 | |
| 128 | |
| 129 | # Global workers proxy for accessing named workers. |