Skip to main content

sympy-reading

Coverage

Convert a small subset of SymPy expressions into Japanese readings.

Installation

pip install sympy-reading

Usage

import sympy
from sympy_reading import to_reading

# Single integer
print(to_reading(sympy.Integer(3)))
# => さん

# Equation: wrap in sympy.evaluate(False) to preserve the unevaluated form
with sympy.evaluate(False):
    eq = sympy.Eq(sympy.Add(11, 22), 33)
    print(to_reading(eq))
    # => じゅういち たす にじゅうに いこーる さんじゅうさん

# Multiplication
with sympy.evaluate(False):
    eq = sympy.Eq(sympy.Mul(2, 3, 4), 24)
    print(to_reading(eq))
    # => に かける さん かける よん いこーる にじゅうよん

Note: Always wrap Add and Mul expressions in sympy.evaluate(False) (or pass evaluate=False to the constructor). Without it, SymPy evaluates the expression before to_reading() can inspect the operator, so the structure is lost.

Supported expression scope

This package currently supports a narrow, explicit subset:

  • non-negative SymPy integer constants;
  • sympy.Add and sympy.Mul expressions whose operands are recursively in the supported subset;
  • sympy.Eq equations whose left and right sides are recursively in the supported subset.

Add is read as infix たす, Mul is read as infix かける, and Eq is read as いこーる.

Unsupported expressions raise NotImplementedError, including symbols, negative integers, rationals, floats, functions, powers, inequalities, and operators other than Add and Mul.

Version Status

This package is currently classified as Development Status :: 3 - Alpha. The API may change without notice. A stable release will be tagged when the supported expression scope stabilizes and breaking changes become unlikely.

Development

This repository uses lefthook to run the same checks as CI locally, so problems surface before they reach CI.

# Install dependencies
uv sync

# Install the Git hooks (once; requires lefthook on your PATH)
lefthook install

Once installed, the hooks run automatically:

  • pre-commit: uv run poe check
  • pre-push: uv run poe check and uv run poe test

You can also run the checks manually:

uv run poe check
uv run poe test

CI still runs the full matrix (see .github/workflows/); the hooks only bring that feedback earlier on your machine.

Metadata

Release files for sympy-reading 0.1.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 sympy-reading 0.1.0
File Size Uploaded Provenance Actions
sympy_reading-0.1.0.tar.gz 41.1 kB With provenance Details for sympy_reading-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sympy-reading 0.1.0
File Interpreter ABI Platform Actions
sympy_reading-0.1.0-py3-none-any.whl Python 3 none any Details for sympy_reading-0.1.0-py3-none-any.whl

Total release size: 46.7 kB

Release files / sympy_reading-0.1.0.tar.gz

Download URL sympy_reading-0.1.0.tar.gz
Size 41.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ba06f7211473cb51d5c5125a38b67a5b73c74c894c2a4a40caebc60ff7698018
BLAKE2b-256 checksum
How to use checksums
74e45925c27afc2e31d65ecb94cfce3bcdf4e385b1c372ec6fd6168d3b358200
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / sympy_reading-0.1.0-py3-none-any.whl

Download URL sympy_reading-0.1.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5949b3ef87a042f1cad7adeb7c865461efce9ccdae96652d1de32fb8d05686d6
BLAKE2b-256 checksum
How to use checksums
79b1b7dfee4b6aca22d823ed4837efdd7f42b325f6e884d2e2856159b9b4b754
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for sympy-reading 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sympy_reading-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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