The "First Flask API Project" is a beginner-level project aimed at introducing Flask API development. It provides a simple API endpoint where users can send two numbers in JSON format, and the API will return the sum of these numbers. This project serves as a practical learning exercise for understanding the basics of building APIs with Flask, handling JSON data, and sending requests using tools like Postman.
This project's use case includes:
- Learning Flask API Development: This project serves as a hands-on introduction to Flask API development for beginners.
- Understanding JSON Data Handling: Users can learn how to handle JSON data in Flask applications, including parsing incoming requests and formatting outgoing responses.
- Practice with API Testing: Users can practice sending requests to the API using tools like Postman to test its functionality and verify responses.
- Clone the repository to your local machine.
- Install the necessary dependencies by running the following command in your terminal:
pip install -r requirements.txt
Run the program using Gunicorn:
gunicorn app:app
To test the API:
- Use Postman or any other API testing tool.
- Send JSON data containing two numbers to the API endpoint.
- Check the response to verify that it returns the sum of the two numbers.
- This is an API project with no graphical user interface (UI).
- Ensure data is sent in the correct JSON format to receive accurate responses.
This project is licensed under the MIT License. See the LICENSE file for details.