Git Product home page Git Product logo

abhi227070 / first-flask-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4 KB

This beginner-level project introduces Flask API development. It features a simple API endpoint where users can submit two numbers in JSON format and receive their sum. The project serves as a learning tool for understanding Flask API basics, JSON data handling, and API testing with tools like Postman.

Procfile 4.50% Python 68.10% Shell 27.40%
flask flask-api flask-api-backend flask-api-rest json json-api python3

first-flask-api's Introduction

First Flask API Project

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.

Table of Contents

Use Case

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.

Usage

Setup

  1. Clone the repository to your local machine.
  2. Install the necessary dependencies by running the following command in your terminal:
    pip install -r requirements.txt

Running the Program

Run the program using Gunicorn:

  gunicorn app:app

Testing the API

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.

Note

  • This is an API project with no graphical user interface (UI).
  • Ensure data is sent in the correct JSON format to receive accurate responses.

License

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

first-flask-api's People

Contributors

abhi227070 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.