Skip to content

lokeshyadav14/Flask-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Flask API

This repo contains a simple Flask API project.

Description

This Flask API project showcases basic CRUD (Create, Read, Update, Delete) operations on a User resource. It is built using Flask, a Python web framework, and connects to a MongoDB database.

Usage

To run the Flask API, follow these steps:

  1. Clone this repository to your local machine:

    git clone <repository-url>
  2. Navigate to the project directory:

    cd 'Flask-API'
  3. Install the required dependencies:

    pip install -r requirements.txt
  4. Start the Flask API:

    python app.py

The API will be accessible at http://localhost:5000.

API Endpoints

  • GET /users: Retrieve a list of all users.
  • GET /users/: Retrieve a user by ID.
  • POST /users: Create a new user.
  • PUT /users/: Update an existing user by ID.
  • DELETE /users/: Delete a user by ID.

Technologies Used

  • Flask
  • MongoDB
  • Python