desmos2python


Namedesmos2python JSON
Version 0.3.4 PyPI version JSON
download
home_pagehttps://github.com/rocapp/desmos2python
Summaryseamless conversion between Desmos LaTeX equations and executable Python code.
upload_time2023-04-09 17:48:48
maintainer
docs_urlNone
authorRobert Ahlroth Capps
requires_python>=3.10
licenseMIT License Copyright (c) 2022 Robbie Capps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords desmos graphing calculator conversion convert to python mathematical modeling
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            desmos2python
=============

convert Desmos equations to executable Python code

Links
-----

-  `desmos2python (PyPI) <https://pypi.org/project/desmos2python/>`__
-  `Desmos Graphing Caculator <https://desmos.com/calculator>`__

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:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

   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``

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rocapp/desmos2python",
    "name": "desmos2python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "desmos,graphing calculator,conversion,convert to python,mathematical modeling",
    "author": "Robert Ahlroth Capps",
    "author_email": "rocapp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f7/d3/ce821fd255a22c6848a59b67d49f5680a50979c0c32ade517cef60829cc2/desmos2python-0.3.4.tar.gz",
    "platform": "Windows",
    "description": "desmos2python\n=============\n\nconvert Desmos equations to executable Python code\n\nLinks\n-----\n\n-  `desmos2python (PyPI) <https://pypi.org/project/desmos2python/>`__\n-  `Desmos Graphing Caculator <https://desmos.com/calculator>`__\n\nDependencies\n------------\n\n**Build/Dev**\n\n-  ``GNU Make``\n-  ``docker``\n\n**Libraries**\n\n*required*\n\n-  pandoc (e.g.\u00a0``apt-get install pandoc`` for Debian-based, or\n   ``pacman -S pandoc`` for Arch Linux)\n\n*(optional) For headless browser functionality (uses ``selenium``):*\n\n-  ``pyenv``\n-  ``libxext6``\n-  ``libxt6``\n-  ``geckodriver`` and ``firefox``\n\nCompatibility\n-------------\n\n-  ``python3.10``\n\n-  NOTE: *working on expanding compatibility\u2026*\n\n-  NOTE: *still a work in progress for sure.*\n\nHelpful tips\n------------\n\n*\u2026definitely recommend using a virtual environment, e.g.\u00a0via docker or\nconda.*\n\nInstall\n-------\n\nFrom PyPi:\n~~~~~~~~~~\n\n``python3 -m pip install desmos2python``\n\nExamples\n--------\n\n``DesmosLatexParser`` API Example:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n   import desmos2python as d2p\n\n   # `file` contains a JSON-formatted list of latex equations\n   # loads the example defined in 'resources/latex_json/ex.json'\n   dlp = d2p.DesmosLatexParser(file='ex.json')\n\n   # `pycode_string` contains the ready-to-eval Desmos model namespace \n   print(dlp.pycode_string)\n\n   # Instantiate a model namespace\n   # The attributes define any formulas, parameters from the specified Desmos graph\n   dmn = dlp.DesmosModelNS()\n\n   # for example, evaluate the function E(x) over the domain x=(1, 2, 3)\n   result = dmn.E([1, 2, 3])\n   print(result)\n\n   # see ./tests for more examples!\n\nDevelopment\n-----------\n\n-  Build locally: ``make build``\n-  Testing: ``pytest``\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 Robbie Capps  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "seamless conversion between Desmos LaTeX equations and executable Python code.",
    "version": "0.3.4",
    "split_keywords": [
        "desmos",
        "graphing calculator",
        "conversion",
        "convert to python",
        "mathematical modeling"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f9e533a3aa3fe7acca2c7d9573d4aa86583fc2dd51649c53e4fd4bb0e7b2f38",
                "md5": "9407484de9a78d1cdea8a8f1608a9dd7",
                "sha256": "13ef67c7eb9212b71349aaa35527a1bfd217cf4be9b8a2b5d786d810b752f73a"
            },
            "downloads": -1,
            "filename": "desmos2python-0.3.4-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9407484de9a78d1cdea8a8f1608a9dd7",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.10",
            "size": 299080,
            "upload_time": "2023-04-09T17:48:46",
            "upload_time_iso_8601": "2023-04-09T17:48:46.078018Z",
            "url": "https://files.pythonhosted.org/packages/5f/9e/533a3aa3fe7acca2c7d9573d4aa86583fc2dd51649c53e4fd4bb0e7b2f38/desmos2python-0.3.4-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7d3ce821fd255a22c6848a59b67d49f5680a50979c0c32ade517cef60829cc2",
                "md5": "c7f7768e86b457523488d00cbee0e5d4",
                "sha256": "36803b3d9f1fde20964405c63bec0bd062a58109bd8cdc60bf67016c0a7d7654"
            },
            "downloads": -1,
            "filename": "desmos2python-0.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "c7f7768e86b457523488d00cbee0e5d4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 2299105,
            "upload_time": "2023-04-09T17:48:48",
            "upload_time_iso_8601": "2023-04-09T17:48:48.351364Z",
            "url": "https://files.pythonhosted.org/packages/f7/d3/ce821fd255a22c6848a59b67d49f5680a50979c0c32ade517cef60829cc2/desmos2python-0.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-09 17:48:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "rocapp",
    "github_project": "desmos2python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "desmos2python"
}
        
Elapsed time: 0.94483s