Skip to main content

Woxi for Python

Python bindings for Woxi, an interpreter for a subset of the Wolfram Language implemented in Rust. Woxi is a computer algebra system (CAS), so computations are solved symbolically.

pip install woxi

Python API

import woxi

woxi.interpret("Plus[1, 2]")
# => '3'

woxi.interpret("Integrate[x^2, x]")
# => 'x^3/3'

# Session state persists across calls (per thread):
woxi.interpret("x = 42;")
woxi.interpret("x + 1")
# => '43'
woxi.clear_state()

# Capture stdout, graphics, sound, and warnings:
res = woxi.evaluate('Print["hi"]; Plot[Sin[x], {x, 0, 10}]')
res.stdout    # => 'hi\n'
res.graphics  # => '<svg …'  (SVG markup)

# Reproducible random numbers:
woxi.seed_rng(1)

# Errors raise woxi.WolframError:
try:
    woxi.interpret("1 +")
except woxi.WolframError as err:
    print(err)

Command line

The package also installs a woxi command:

woxi eval 'Plus[1, 2]'     # Evaluate an expression
woxi run script.wls        # Run a Wolfram Language file
woxi repl                  # Interactive session

For the full-featured native CLI (including the Jupyter kernel), install the Rust binary instead: cargo install woxi.

Building from source

The package is built with maturin and requires a Rust toolchain:

cd woxi-py
pip install maturin
maturin develop  # Build and install into the active virtualenv

Run the tests with:

python -m pytest tests/

License

AGPL-3.0-or-later

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

woxi-0.3.0.tar.gz (4.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

woxi-0.3.0-cp310-abi3-win_amd64.whl (26.8 MB view details)

Uploaded CPython 3.10+Windows x86-64

woxi-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (24.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

woxi-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (25.1 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

woxi-0.3.0-cp310-abi3-macosx_11_0_arm64.whl (24.1 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

woxi-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl (24.4 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file woxi-0.3.0.tar.gz.

File metadata

  • Download URL: woxi-0.3.0.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for woxi-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f64f97dae750d2c84938730701de5496eb867fc4e3832ed9b0bba450b27e8d20
MD5 c22f89b7e7d0100f446e9d2e3c80a868
BLAKE2b-256 61fa0690db4ca430786a0f3731246148ae90884193223c99238485dc357b8840

See more details on using hashes here.

Provenance

The following attestation bundles were made for woxi-0.3.0.tar.gz:

Publisher: publish-pypi.yml on ad-si/Woxi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file woxi-0.3.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: woxi-0.3.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 26.8 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for woxi-0.3.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ad8f8c724176a2f374b9ac36b7ffb9d77d30a2c0ac4d134d9f62943057c3dca6
MD5 ee876cf7fade9b6ec0ea10ba4e59e80b
BLAKE2b-256 5afa1602a26bcfa4e6f3efd127b798ab60da5951be99417fda16a513d7d16f80

See more details on using hashes here.

Provenance

The following attestation bundles were made for woxi-0.3.0-cp310-abi3-win_amd64.whl:

Publisher: publish-pypi.yml on ad-si/Woxi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file woxi-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for woxi-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46fedeab967568383f3fef2da5543bcb119be92a2de7093f5a778952003c5a0b
MD5 e05aa9f0c01ff7843d362f64fb92b8a2
BLAKE2b-256 4ba160c8b4bd0212af758562b83bea964a8a444b5c0cc51f02c5fe20c0078a17

See more details on using hashes here.

Provenance

The following attestation bundles were made for woxi-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on ad-si/Woxi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file woxi-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for woxi-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6f3bfd172a8c248eeabb0a0fa50e6b4e8269d3b2263fb0f2a5b00dcb8b589e8e
MD5 c0e80a1752bcb26f32c8b6f1234f5e93
BLAKE2b-256 77def9d650028d9510912a6b70a0140a85bb41daa98b97552027075e8c792c5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for woxi-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish-pypi.yml on ad-si/Woxi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file woxi-0.3.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: woxi-0.3.0-cp310-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 24.1 MB
  • Tags: CPython 3.10+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for woxi-0.3.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7b02aa9f8b57df55fb18b86b4343cc0cb756905e875869bc61d0862462fb0029
MD5 44507c854a902bd5a6319d11d668333f
BLAKE2b-256 e582c06ec617ba628704e5e2ffc96a482709d09392e5962305112417fd11f51b

See more details on using hashes here.

Provenance

The following attestation bundles were made for woxi-0.3.0-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on ad-si/Woxi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file woxi-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for woxi-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bb643aca6dd5e37203c5f2d75c8fb89c9da770075cbeabab3dc018585ef6e5b6
MD5 49313bb5559df907e9c1a31ed1d42675
BLAKE2b-256 eef19daffa71f3cc55a9c3a949581c860fa1453a5137833c23a421eb1c551bb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for woxi-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: publish-pypi.yml on ad-si/Woxi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

6 files

0.2.0

6 files

0.1.0

6 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page