Name | multicalc JSON |
Version |
1.0.0
JSON |
| download |
home_page | None |
Summary | A modular Python calculator with reusable core logic, CLI, REST API, and import — demonstrating a multi-entry architecture. |
upload_time | 2025-07-16 18:22:31 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
api
calculator
cli
example
fastapi
modular
python
typer
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Multientry-Calc-Example
An example project of modular Python architecture, featuring a reusable core and multiple entry points: CLI, REST API, and import. This is a demonstration project for learning and testing purposes.
## Installation
Install the core library:
```bash
pip install .
```
Install with CLI support:
```bash
pip install .[cli]
```
Install with REST API support:
```bash
pip install .[api]
```
## Usage via CLI
After installing with `[cli]`, run:
```bash
multicalc add 2 3
multicalc subtract 5 2
multicalc multiply 4 6
multicalc divide 8 2
```
## Usage via REST API
After installing with `[api]`, start the server:
```bash
multicalc-serve
```
Access Swagger docs at: [http://localhost:8000/docs](http://localhost:8000/docs)
Example endpoints:
- `GET /add?x=2&y=3`
- `GET /subtract?x=5&y=2`
- `GET /multiply?x=4&y=6`
- `GET /divide?x=8&y=2`
## Usage as a Library (Import)
Import and use the core calculator in Python:
```python
from multicalc import Calculator
calc = Calculator()
print(calc.add(2, 3))
print(calc.subtract(5, 2))
print(calc.multiply(4, 6))
print(calc.divide(8, 2))
```
See also the example script in `examples/usage.py` for more details.
---
This project is for demonstration and educational purposes only.
Raw data
{
"_id": null,
"home_page": null,
"name": "multicalc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "api, calculator, cli, example, fastapi, modular, python, typer",
"author": null,
"author_email": "Matheus de Andrade <matheusdeandradesv@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/22/26/39b0b873e96021507d8fdd4f1af49b530d0dc45950a7bbdf58b3c693e994/multicalc-1.0.0.tar.gz",
"platform": null,
"description": "\n# Multientry-Calc-Example\n\nAn example project of modular Python architecture, featuring a reusable core and multiple entry points: CLI, REST API, and import. This is a demonstration project for learning and testing purposes.\n\n## Installation\n\nInstall the core library:\n\n```bash\npip install .\n```\n\nInstall with CLI support:\n\n```bash\npip install .[cli]\n```\n\nInstall with REST API support:\n\n```bash\npip install .[api]\n```\n\n## Usage via CLI\n\nAfter installing with `[cli]`, run:\n\n```bash\nmulticalc add 2 3\nmulticalc subtract 5 2\nmulticalc multiply 4 6\nmulticalc divide 8 2\n```\n\n## Usage via REST API\n\nAfter installing with `[api]`, start the server:\n\n```bash\nmulticalc-serve\n```\n\nAccess Swagger docs at: [http://localhost:8000/docs](http://localhost:8000/docs)\n\nExample endpoints:\n\n- `GET /add?x=2&y=3`\n- `GET /subtract?x=5&y=2`\n- `GET /multiply?x=4&y=6`\n- `GET /divide?x=8&y=2`\n\n## Usage as a Library (Import)\n\nImport and use the core calculator in Python:\n\n```python\nfrom multicalc import Calculator\n\ncalc = Calculator()\nprint(calc.add(2, 3)) \nprint(calc.subtract(5, 2)) \nprint(calc.multiply(4, 6)) \nprint(calc.divide(8, 2)) \n```\n\nSee also the example script in `examples/usage.py` for more details.\n\n---\nThis project is for demonstration and educational purposes only.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A modular Python calculator with reusable core logic, CLI, REST API, and import \u2014 demonstrating a multi-entry architecture.",
"version": "1.0.0",
"project_urls": null,
"split_keywords": [
"api",
" calculator",
" cli",
" example",
" fastapi",
" modular",
" python",
" typer"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "44123960cc44c9d7ee1a9cd3e0e9e294296874884f416dd194616fbfef810c28",
"md5": "6688de2045300702eb7ee3539ec6a866",
"sha256": "b6d1f4ef0e7da7efb5c69aad0df6429361587b353e17a8c3e0c615a4f3a15a78"
},
"downloads": -1,
"filename": "multicalc-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6688de2045300702eb7ee3539ec6a866",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4823,
"upload_time": "2025-07-16T18:22:29",
"upload_time_iso_8601": "2025-07-16T18:22:29.556165Z",
"url": "https://files.pythonhosted.org/packages/44/12/3960cc44c9d7ee1a9cd3e0e9e294296874884f416dd194616fbfef810c28/multicalc-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "222639b0b873e96021507d8fdd4f1af49b530d0dc45950a7bbdf58b3c693e994",
"md5": "be7d722f09eef50bda4440a6f97ff53f",
"sha256": "ef845b4c827c3941d286dc94794ba849ffb48b126063a748aec745fce22242fe"
},
"downloads": -1,
"filename": "multicalc-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "be7d722f09eef50bda4440a6f97ff53f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 3390,
"upload_time": "2025-07-16T18:22:31",
"upload_time_iso_8601": "2025-07-16T18:22:31.015128Z",
"url": "https://files.pythonhosted.org/packages/22/26/39b0b873e96021507d8fdd4f1af49b530d0dc45950a7bbdf58b3c693e994/multicalc-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-16 18:22:31",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "multicalc"
}