Not everything in a Python module is a function. Module-level variables — strings, numbers, booleans, dicts, lists, andDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Crane04/esem/llms.txt
Use this file to discover all available pages before exploring further.
None — are exposed on the module proxy as awaitable properties. Each access triggers a get_attr RPC call to the Python worker, which reads the attribute value, serializes it, and returns it to JavaScript. The result is deserialized automatically into the equivalent native JS type.
Defining constants in Python
Reading constants from JavaScript
Await the property access on the module proxy to retrieve the value:Destructuring constants
When you destructure a non-callable export, the destructured binding itself is aPromise. Await it when you need the value:
Each property access on a non-callable attribute sends a fresh
get_attr RPC to the Python worker. If you read the same constant multiple times, store the resolved value in a local JS variable instead of awaiting the property repeatedly.Type mapping reference
The test fixture (test/fixture.py) covers all supported constant types. The table below shows what each Python value becomes in JavaScript:
| Python constant | Python type | JavaScript value | JavaScript type |
|---|---|---|---|
VERSION = "0.1.2" | str | "0.1.2" | string |
ENABLED = True | bool | true | boolean |
RETRY_COUNT = 3 | int | 3 | number |
NOTHING = None | NoneType | null | null |
SETTINGS = {...} | dict | { debug: true, ports: [...] } | object |