API Reference¶
Futures module¶
The following methods are part of the futures module. They can be accessed like so:
from scoop import futures
results = futures.map(func, data)
futureObject = futures.submit(func, arg)
...
More informations are available in the Usage document.
Future class¶
The submit()
function returns a
Future
object.
This instance possesses the following methods.
SCOOP Constants and objects¶
The following objects are available to a program that was launched using SCOOP.
Note
Please note that using these is considered as advanced usage. You should not rely on these for other purposes than debugging.
Constants | Description |
---|---|
scoop.IS_ORIGIN | Boolean value. True if current instance is the root worker. |
scoop.BROKER | broker.broker.BrokerInfo namedtuple. Address, ports and hostname of the broker. |
scoop.DEBUG | Boolean value. True if debug mode is enabled, false otherwise. |
scoop.IS_RUNNING | Boolean value. True if SCOOP is currently running, false otherwise. |
scoop.worker | 2-tuple. Unique identifier of the current instance in the pool. |
scoop.logger | Logger object. Provides log formatting and redirection facilities. See the official documentation for more information on its usage. |