Skip to main content

ries-rs

Python bindings for ries, a Rust inverse equation solver that turns a target number into compact algebraic equations.

Install the package from PyPI as ries-rs, then import it in Python as ries_rs.

The Python package uses the same core search engine as the CLI and WASM builds, including the same presets and typed match objects. For deterministic mode, JSON manifests, or the full compatibility-oriented CLI surface, use the main ries-rs executable.

Install

pip install ries-rs

Published wheels use CPython's stable ABI and support Python 3.9 and newer.

Quick Start

import ries_rs

results = ries_rs.search(1.6487212707, level=5, max_matches=3)
for match in results:
    print(f"{match.lhs} = {match.rhs}")
x^2 = e
x = sqrt(e)
ln(x) = 1/2

For rounded numerical observations, preserve the decimal as text and use the additive discovery API:

import json

run = ries_rs.discover("3.14159265", level=3, max_matches=3)
print(run["hypotheses"][0]["representative"]["solve_for_x"])  # x = pi
print(json.dumps(run, allow_nan=False))

The plain dictionary includes the original literal, resolved search settings, actual matcher statistics, and separate validation statuses. The cheapest equation resolving the entered precision bounds discovery, so fewer hypotheses than requested can be returned. Existing search() keeps its raw typed matches. Numerical matches and optional higher-precision corroboration are not proof.

More Examples

Use a preset to expose domain-specific constants:

import ries_rs

results = ries_rs.search(1.64493406685, preset="analytic-nt", level=2, max_matches=5)
for match in results[:5]:
    print(match.solve_for_x or f"{match.lhs} = {match.rhs}")

Export structured results for notebooks or downstream tooling:

import json
import ries_rs

payload = [match.to_dict() for match in ries_rs.search(1.618033988749895, max_matches=3)]
print(json.dumps(payload, indent=2))

What You Get

  • ries_rs.search(...) for equation search
  • ries_rs.discover(...) for decimal-precision-aware hypotheses and run records
  • ries_rs.list_presets() for available domain presets
  • ries_rs.version() for runtime version checks
  • PyMatch objects with to_dict() for serialization

Metadata

Release files for ries-rs 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ries-rs 3.0.0
File Size Uploaded Provenance Actions
ries_rs-3.0.0.tar.gz 3.5 MB Without provenance Details for ries_rs-3.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ries-rs 3.0.0
File Interpreter ABI Platform Actions
ries_rs-3.0.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for ries_rs-3.0.0-cp39-abi3-win_amd64.whl
ries_rs-3.0.0-cp39-abi3-manylinux_2_34_x86_64.whl CPython 3.9 abi3 Linux glibc 2.34+ x86-64 Details for ries_rs-3.0.0-cp39-abi3-manylinux_2_34_x86_64.whl
ries_rs-3.0.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for ries_rs-3.0.0-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 4.9 MB

Release files / ries_rs-3.0.0.tar.gz

Download URL ries_rs-3.0.0.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
bf3f1993e208baf637b9a04229123cc97096759d23724ea05b7d680e23c4fb1f
BLAKE2b-256 checksum
How to use checksums
1f40954c587fcabb4a495549f27752f6ea2a0757469991b2d6071a0d508004bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ries_rs-3.0.0-cp39-abi3-win_amd64.whl

Download URL ries_rs-3.0.0-cp39-abi3-win_amd64.whl
Size 415.8 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c5a60a8e51b69cc4e476c2134c18048979af0b27a08976166864fdded6e01bc2
BLAKE2b-256 checksum
How to use checksums
48cd4360a0650c3ca5792b8e3bfce6f347dce990ff32f61aedf606b105b97644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ries_rs-3.0.0-cp39-abi3-manylinux_2_34_x86_64.whl

Download URL ries_rs-3.0.0-cp39-abi3-manylinux_2_34_x86_64.whl
Size 536.7 kB
Tags CPython 3.9 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
ab854fedda59f593c66eb76b8f927f6053c945b74589aa8abc4dab70ca5e3fca
BLAKE2b-256 checksum
How to use checksums
9e0fe9462398568b54eefec61c4266aceab5f2589182dd6e2451ea7c122db747
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ries_rs-3.0.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL ries_rs-3.0.0-cp39-abi3-macosx_11_0_arm64.whl
Size 476.7 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f3435723f67c1bffdb33ea66f4cac6cd9a6a8ab4a93e0242e3d944318f647470
BLAKE2b-256 checksum
How to use checksums
45c636b8b27a6f4daef5ecc1ceae4ec35f4dafae6d86655a2db559397f9618fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for ries-rs 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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