Giter Site home page Giter Site logo

restful_person_management_api's Introduction

RESTful Person Management API

A RESTful API for managing person records, enabling you to create, read, update, and delete person information while providing dynamic parameter handling and secure database interactions. This project is done for HNGx internship Stage-2 Task

Table of Contents

  1. Requirements
  2. Installation
  3. Usage
  4. API Endpoints
  5. Documentation

Requirements

Before you begin, ensure you have all the requirements installed on your system:

Install the project dependencies:

pip install -r requirements.txt

Installation

  1. Clone the repository to your local machine:

    git clone https://github.com/Mahlet2123/RESTful_Person_Management_API.git

  2. Navigate to the project directory:

    cd RESTful_Person_Management_API

Usage

To run the API, use the following command:

python -m app

Here is the Class Diagram (UML) represents the structure of the Flask application and the Person model, including their attributes and relationships.

Class Diagram (UML)

API Endpoints

The API provides the following endpoints for CRUD operations on persons:

  • Create a New Person

Endpoint: POST /api

Request Body: JSON object with "name" (string) and "age" (integer) fields.

Example:

{
  "name": "John Doe",
  "age": 30
}
  • Get Person Details

Endpoint: GET /api/int:user_id Example: GET /api/1

  • Update Person Details

Endpoint: PUT /api/int:user_id

Request Body: JSON object with "name" (string) and "age" (integer) fields.

Example:

{
  "name": "Updated Name",
  "age": 35
}
  • Delete a Person

Endpoint: DELETE /api/int:user_id

Documentation

For detailed API documentation, including request/response formats and examples, please refer to the API_Documentation file.

restful_person_management_api's People

Contributors

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