Pending Actions (Server Jobs)
A Pending Action is the record of a background process running on the server. Endpoints that start long-running work, such as imports, exports and texture generation, return one of these instead of making you wait, and it is the handle you use to follow that work to completion.
See Pending Actions in the API reference for the underlying endpoints.
Waiting for completion
Rather than polling yourself, hand the ID to on_completion. It blocks until the action reaches a terminal state and returns both the final record and every progress message it saw along the way.
A failed or cancelled action returns normally rather than raising, because the messages are usually what you need in order to find out why. Check Status to tell the outcomes apart.
You can follow progress as it happens, and give up after a while instead of waiting indefinitely.
Reading records directly
The Result property is always a dictionary. The API returns it as a string by default, which is usually but not always stringified JSON, so this library requests the parsed form and saves you guessing. A result that was not JSON arrives as { "Output": "..." }.
Statuses
BM.EStatus holds the available statuses, and BM.EStatus.FINISHED is the set of terminal ones so you do not have to list them yourself.