{"id":20323539,"url":"https://github.com/dplocki/calculator-kata","last_synced_at":"2026-05-28T13:31:19.372Z","repository":{"id":119391048,"uuid":"412807358","full_name":"dplocki/calculator-kata","owner":"dplocki","description":"The full infix calculator kata, written in Python","archived":false,"fork":false,"pushed_at":"2023-08-17T18:51:32.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T10:16:06.139Z","etag":null,"topics":["calculator","calculator-python","code-kata","infix","infix-notation-calculator","kata","python","python-3","python3","python311","reverse-polish","reverse-polish-notation","rpn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/dplocki.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-02T13:40:27.000Z","updated_at":"2023-08-18T15:46:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"82a37c7f-0dd1-4d8a-9ec2-c792821f056d","html_url":"https://github.com/dplocki/calculator-kata","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dplocki/calculator-kata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplocki%2Fcalculator-kata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplocki%2Fcalculator-kata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplocki%2Fcalculator-kata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplocki%2Fcalculator-kata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dplocki","download_url":"https://codeload.github.com/dplocki/calculator-kata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplocki%2Fcalculator-kata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33611248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["calculator","calculator-python","code-kata","infix","infix-notation-calculator","kata","python","python-3","python3","python311","reverse-polish","reverse-polish-notation","rpn"],"created_at":"2024-11-14T19:28:34.392Z","updated_at":"2026-05-28T13:31:19.352Z","avatar_url":"https://github.com/dplocki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calculator kata\n\n![GitHub](https://img.shields.io/github/license/dplocki/calculator-kata)\n![Python 3](https://img.shields.io/badge/python-3.11-informational)\n![GitHub top language](https://img.shields.io/github/languages/top/dplocki/calculator-kata)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n![GitHub last commit](https://img.shields.io/github/last-commit/dplocki/calculator-kata)\n\n## 📒 Idea\n\nThe standard [String Calculator](https://codingdojo.org/kata/StringCalculator/) kata is much simpler that this one. The task is to parse the string, find all numbers and calculate the sum. There is also the [RPN calculator](https://codingdojo.org/kata/RPN/) kata, which is closer to it.\n\nThis one is the calculator, which is parsing the input (string) as [infix](https://en.wikipedia.org/wiki/Infix_notation) notated operation and return its result. In short: you can type the mathematical operation in *human way* and see the result.\n\n## ✔️ Functionality\n\n* adding, subtraction\n* multiple, division\n* negation (minus before some expression)\n* power\n* brackets (the round one only)\n* float numbers, in simple and scientific notation\n* simple validation (double operators, letters in place of numbers etc.)\n\n## ⚙️ Run\n\nThe module is ready to use:\n\n```py\nfrom calculator import calculate\n\nprint(calculate('32 + 45 * 34 - 23'))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdplocki%2Fcalculator-kata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdplocki%2Fcalculator-kata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdplocki%2Fcalculator-kata/lists"}