desmos2python
convert Desmos equations to executable Python code
Links
Dependencies
Build/Dev
GNU Make
docker
Libraries
required
pandoc (e.g. apt-get install pandoc for Debian-based, or pacman -S pandoc for Arch Linux)
(optional) For headless browser functionality (uses ``selenium``):
pyenv
libxext6
libxt6
geckodriver and firefox
Compatibility
python3.10
NOTE: working on expanding compatibility…
NOTE: still a work in progress for sure.
Helpful tips
…definitely recommend using a virtual environment, e.g. via docker or conda.
Install
From PyPi:
python3 -m pip install desmos2python
Examples
DesmosLatexParser API Example:
import desmos2python as d2p
# `file` contains a JSON-formatted list of latex equations
# loads the example defined in 'resources/latex_json/ex.json'
dlp = d2p.DesmosLatexParser(file='ex.json')
# `pycode_string` contains the ready-to-eval Desmos model namespace
print(dlp.pycode_string)
# Instantiate a model namespace
# The attributes define any formulas, parameters from the specified Desmos graph
dmn = dlp.DesmosModelNS()
# for example, evaluate the function E(x) over the domain x=(1, 2, 3)
result = dmn.E([1, 2, 3])
print(result)
# see ./tests for more examples!
Development
Build locally: make build
Testing: pytest
Metadata
Release files for desmos2python 0.3.4
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 | Actions |
|---|---|---|---|---|
| desmos2python-0.3.4.tar.gz | 2.3 MB | Without provenance | Details for desmos2python-0.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| desmos2python-0.3.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for desmos2python-0.3.4-py2.py3-none-any.whl |
Total release size: 2.6 MB
Release files / desmos2python-0.3.4.tar.gz
| Download URL | desmos2python-0.3.4.tar.gz |
|---|---|
| Size | 2.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36803b3d9f1fde20964405c63bec0bd062a58109bd8cdc60bf67016c0a7d7654
|
|
BLAKE2b-256 checksum How to use checksums |
f7d3ce821fd255a22c6848a59b67d49f5680a50979c0c32ade517cef60829cc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Release files / desmos2python-0.3.4-py2.py3-none-any.whl
| Download URL | desmos2python-0.3.4-py2.py3-none-any.whl |
|---|---|
| Size | 299.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
13ef67c7eb9212b71349aaa35527a1bfd217cf4be9b8a2b5d786d810b752f73a
|
|
BLAKE2b-256 checksum How to use checksums |
5f9e533a3aa3fe7acca2c7d9573d4aa86583fc2dd51649c53e4fd4bb0e7b2f38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Security for desmos2python 0.3.4
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.