Skip to content

Inspired form ipad's new calculator which makes maths and physics more fun and easier to understand due to animation and graphics

Notifications You must be signed in to change notification settings

Kishan-Patel-dev/iPad-Backend

Repository files navigation

iPad Math Calculator Backend

This is the backend for the iPad Math Calculator project, built using Python with FastAPI. This backend handles requests from the frontend and performs necessary calculations.

Table of Contents

Live Demo

You can try out the live demo of the iPad Math Calculator at the following link:

Live Demo

Demo Video

Check out the demo video showcasing the iPad Math Calculator functionality:

Demo GIF

Installation

To set up the project locally, follow these steps:

  1. Clone the repository:

    https://github.com/Kishan-Patel-dev/iPad-Backend.git
    cd ipad-be
  2. Create a virtual environment:

    python3 -m venv venv
  3. Activate the virtual environment:

    For Fish shell:

    source venv/bin/activate.fish

    For Bash or Zsh:

    source venv/bin/activate
  4. Install the required packages:

    pip install fastapi Pillow uvicorn pydantic google.generativeai python-dotenv
  5. Create a .env file in the root directory to store your environment variables. You can do this by running:

    touch .env

    Then, add your Gemini API key:

    # Gemini API Credentials
    GEMINI_API_KEY=your_api_key_here
    

    Note: The .env file is not included in the repository for security reasons. Make sure to add your credentials after creating the file.

Usage

To run the application locally, execute the following command:

uvicorn app.calculator.route:app --reload

Visit http://127.0.0.1:8000 in your browser to access the API.

Development

During development, the following commands were used:

mkdir ipad-be
https://github.com/Kishan-Patel-dev/iPad-Backend.git
python3 -m venv venv
touch .env
pip install fastapi Pillow uvicorn pydantic google.generativeai python-dotenv
python3 main.py

File Structure

ipad-be/
├── .gitignore
├── .env
├── .venv
├── __pycache__/
├── app/
│   └── calculator/
│       ├── __pycache__/
│       └── route.py
├── main.py
├── schema.py
└── constants.py

Environment Variables

In the .env file, add your Gemini API credentials as follows:

# Gemini API Credentials
GEMINI_API_KEY=your_api_key_here

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Inspired form ipad's new calculator which makes maths and physics more fun and easier to understand due to animation and graphics

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages