sbmlmath - a Python library for handling SBML MathML
This is Python library for interconverting SymPy expressions and SBML MathML. SBML uses a subset of MathML that this library tries to support. This is not (intended to be) a general MathML parser.
Main functionality:
- sympy -> SBML MathML
- SBML MathML -> sympy
- in particular for cases where
sympy.sympify(libsbml.formulaToL3String(...))won't do the job - retaining unit annotations and other
<ci>attributes
- in particular for cases where
NOTE: This is under development and the API is to be considered unstable
Usage
from sbmlmath import MyMathMLContentPrinter, SBMLMathMLParser
import sympy as sp
sympy_expr = sp.sympify("A ** B + exp(C) * D")
mathml = MyMathMLContentPrinter().doprint(sympy_expr)
print(mathml)
cycled_sympy = SBMLMathMLParser().parse_str(mathml)
print(cycled_sympy)
assert sympy_expr == cycled_sympy
Metadata
Release files for sbmlmath 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sbmlmath-0.0.0.tar.gz | 11.8 kB | Without provenance | Details |
Release files / sbmlmath-0.0.0.tar.gz
| Download URL | sbmlmath-0.0.0.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0015bfe598f25c2c2c179867be58e52ed2e47c285055d9696bef3ad5a1d9ae5
|
|
BLAKE2b-256 checksum How to use checksums |
84cfe5e18b19ac4b46dec5bb92b479de4bf92a2e17d6213478d8643434d13a92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for sbmlmath 0.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.