{"id":37067674,"url":"https://github.com/sertdfyguhi/meth","last_synced_at":"2026-01-14T07:57:08.811Z","repository":{"id":158047059,"uuid":"633685087","full_name":"sertdfyguhi/meth","owner":"sertdfyguhi","description":"A Python library to parse and evaluate mathematical equations.","archived":false,"fork":false,"pushed_at":"2023-09-29T06:45:13.000Z","size":116,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-27T01:40:52.134Z","etag":null,"topics":["equation","interpreter","math","math-library","mathematics","parser","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/meth/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sertdfyguhi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-28T03:50:11.000Z","updated_at":"2025-09-16T21:45:19.000Z","dependencies_parsed_at":"2023-09-29T08:33:40.986Z","dependency_job_id":null,"html_url":"https://github.com/sertdfyguhi/meth","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/sertdfyguhi/meth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sertdfyguhi%2Fmeth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sertdfyguhi%2Fmeth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sertdfyguhi%2Fmeth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sertdfyguhi%2Fmeth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sertdfyguhi","download_url":"https://codeload.github.com/sertdfyguhi/meth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sertdfyguhi%2Fmeth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["equation","interpreter","math","math-library","mathematics","parser","python"],"created_at":"2026-01-14T07:57:08.265Z","updated_at":"2026-01-14T07:57:08.804Z","avatar_url":"https://github.com/sertdfyguhi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meth: A mathematical expression parser.\n\nA python package to parse and evaluate mathematical expressions.\n\n# Installation\n\n```sh\npip install meth\n```\n\nor install it from source:\n\n```sh\ngit clone https://github.com/sertdfyguhi/meth/\ncd meth\npython3 -m build\npip install dist/*.whl\n```\n\n# Examples\n\n\u003e _More examples in the [examples/](https://github.com/sertdfyguhi/meth/tree/master/examples) directory._\n\n```py\nimport meth\n\n# tokenizing equations\nmeth.tokenize(\"5 + 2\") # INT(5), PLUS, INT(2)\n\n# parsing equations\nmeth.parse(\"2 * 10\") # BinaryOpNode(INT(2), MUL, INT(10))\n\n# evaluating equations\nmeth.evaluate(\"2 + 2\") # 4\nmeth.evaluate(\"sqrt(9)\") # 3\n\n# evaluation with variables\nevaluator = meth.Evaluator()\nevaluator.evaluate(\"x = 5\")\nevaluator.evaluate(\"x\") # 5\n```\n\n# Todo\n\n- [x] Lexer\n- [x] Parser\n  - [x] Bracketing\n  - [x] Multiplication using brackets\n  - [x] Negative Numbers\n  - [x] Variables\n  - [x] Functions\n- [x] Interpreter\n  - [x] Binary Operations\n  - [x] Unary Operations\n  - [x] Variables\n  - [x] Functions\n- [x] Add mathematical functions\n- [ ] Accurate float calculations\n- [ ] Simplify an expression\n- [ ] Expand an expression\n- [x] AST to Equation String\n- [ ] Documentation\n- [x] Publish to PyPI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsertdfyguhi%2Fmeth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsertdfyguhi%2Fmeth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsertdfyguhi%2Fmeth/lists"}