Wolfram Client Library for Python

The client library provides seamless Wolfram Language integration in Python.

Wolfram Language Sessions

Local Wolfram Language Sessions

(WebLink[WolframLanguageSession, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.evaluation.html#wolframclient.evaluation.WolframLanguageSession]) — start a persistent session with a local Wolfram Engine

(WebLink[WolframLanguageAsyncSession, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.evaluation.html#wolframclient.evaluation.WolframLanguageAsyncSession]) — perform tasks asynchronously using Python coroutines

Wolfram Cloud Sessions

(WebLink[WolframCloudSession, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.evaluation.html#wolframclient.evaluation.WolframCloudSession]) — connect to a cloud, public or private

(WebLink[WolframCloudAsyncSession, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.evaluation.html#wolframclient.evaluation.WolframCloudAsyncSession]) — perform tasks asynchronously using Python coroutines

Session Object Methods

(WebLink[evaluate, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.evaluation.html#wolframclient.evaluation.base.WolframEvaluator.evaluate]) — evaluate a Wolfram Language expression from Python

(WebLink[evaluate_future, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.evaluation.html#wolframclient.evaluation.base.WolframEvaluator.evaluate_future]) — evaluate a Wolfram Language expression asynchronously

(WebLink[function, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.evaluation.html#wolframclient.evaluation.base.WolframEvaluator.function]) — create a Python function from a Wolfram Language expression

Expression Representation

(WebLink[wl, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.language.html#wolframclient.language.wl]) — represent expressions with Python objects

(WebLink[wlexpr, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.language.html#wolframclient.language.wlexpr]) — represent expressions with (RefLink[InputForm, paclet:ref/InputForm]) strings

Serialization & Deserialization

(WebLink[export, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.serializers.html#wolframclient.serializers.export]) — give a binary representation of Python objects in the requested format

(WebLink[binary_deserialize, https://reference.wolfram.com/language/WolframClientForPython/api/wolframclient.deserializers.html#wolframclient.deserializers.binary_deserialize]) — create a Python object from WXF bytes

Exceptions