Metadata-Version: 2.4
Name: multicalc
Version: 1.0.0
Summary: A modular Python calculator with reusable core logic, CLI, REST API, and import — demonstrating a multi-entry architecture.
Author-email: Matheus de Andrade <matheusdeandradesv@gmail.com>
License: MIT
License-File: LICENSE
Keywords: api,calculator,cli,example,fastapi,modular,python,typer
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Requires-Dist: fastapi>=0.116
Requires-Dist: typer>=0.16
Requires-Dist: uvicorn[standard]>=0.35
Provides-Extra: all
Requires-Dist: fastapi>=0.116; extra == 'all'
Requires-Dist: typer>=0.16; extra == 'all'
Requires-Dist: uvicorn[standard]>=0.35; extra == 'all'
Provides-Extra: api
Requires-Dist: fastapi>=0.116; extra == 'api'
Requires-Dist: uvicorn[standard]>=0.35; extra == 'api'
Provides-Extra: cli
Requires-Dist: typer>=0.16; extra == 'cli'
Description-Content-Type: text/markdown


# 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.

