An open API service indexing awesome lists of open source software.

https://github.com/thiagohrcosta/calculator-app

Calculator APP is a Python-based API developed as part of the Rockeseat specialization in Python. The project simulates a real-world application while applying best practices in software design, architecture, and scalability. The main focus is on:
https://github.com/thiagohrcosta/calculator-app

api design-patterns flask numpy python

Last synced: 2 months ago
JSON representation

Calculator APP is a Python-based API developed as part of the Rockeseat specialization in Python. The project simulates a real-world application while applying best practices in software design, architecture, and scalability. The main focus is on:

Awesome Lists containing this project

README

          

# ๐Ÿ“Ÿ Calculator APP

## ๐Ÿš€ About the Project

Calculator APP is a Python-based API developed as part of the Rockeseat specialization in Python. The project simulates a real-world application while applying best practices in software design, architecture, and scalability. The main focus is on:

- ๐Ÿ— **Clean and scalable code structure**

- ๐Ÿงช **Unit testing for reliability**

- ๐Ÿ”„ **Separation of concerns** for maintainability

- ๐Ÿšจ **Request error handling** for robustness

This project is designed to strengthen coding skills while following industry best practices in Python development.

## Technologies
![enter image description here](https://camo.githubusercontent.com/caeca246a36e19149fde4f4bea527bd4b13ef7ed3ed059549d1cde0a5ff4abd8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f666c61736b2d2532333030302e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d666c61736b266c6f676f436f6c6f723d7768697465) ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54) ![NumPy](https://img.shields.io/badge/numpy-%23013243.svg?style=for-the-badge&logo=numpy&logoColor=white)
----------

## ๐Ÿ— Project Architecture

The application follows a structured folder organization:

```
๐Ÿ“ฆ calculator-app
โ”ฃ ๐Ÿ“‚ src
โ”ƒ โ”ฃ ๐Ÿ“‚ calculators โž Contains different calculator implementations & tests
โ”ƒ โ”ฃ ๐Ÿ“‚ errors โž Handles API errors and exceptions
โ”ƒ โ”ฃ ๐Ÿ“‚ main โž Application entry point, factories, and routes
โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“‚ factories โž Factory pattern for modular calculator instances
โ”ƒ โ”ƒ โ”ฃ ๐Ÿ“‚ routes โž API endpoints and request handling
โ”ƒ โ”ƒ โ”— ๐Ÿ“‚ server โž Server initialization
โ”— ๐Ÿ“‚ .vscode โž Development environment settings
```

## โš™๏ธ Installation & Setup

1๏ธโƒฃ **Clone the Repository:**

```
git clone https://github.com/your-username/calculator-app.git
cd calculator-app
```

2๏ธโƒฃ **Create a Virtual Environment (Recommended):**

```
python -m venv venv
source venv/bin/activate # For macOS/Linux
venv\Scripts\activate # For Windows
```

3๏ธโƒฃ **Install Dependencies:**

```
pip install -r requirements.txt
```

4๏ธโƒฃ **Run the Application:**

```
python src/main/server/__init__.py or
python3 run.py
```

----------

## ๐Ÿงช Running Tests

To ensure code reliability, run the unit tests with:

```
pytest
```

## ๐Ÿ“Œ Features

โœ… Modular calculator implementations

โœ… Factory pattern for scalability

โœ… Structured error handling

โœ… Unit-tested components

โœ… API-ready architecture

โœ… NumPy-powered calculations for high-performance processing

## ๐ŸŽฏ Why This Project?

This project is an excellent demonstration of Python best practices, test-driven development, and scalable software architecture. If you're looking for a well-structured API project, this is it!

๐Ÿ”น **Built for scalability** โž Designed with clean architecture principles

๐Ÿ”น **Focused on maintainability** โž Code is structured for easy modifications

๐Ÿ”น **Industry-standard patterns** โž Factory design, error handling, and unit testing

๐Ÿ”น **NumPy integration** โž Optimized mathematical computations for performance

## ๐Ÿ“„ License

This project is licensed under the MIT License.

----------