From d72994c94f40bcc1f260ce012432314b2013a1cd Mon Sep 17 00:00:00 2001 From: Shamso Osman Date: Tue, 5 Nov 2024 15:43:56 +0000 Subject: [PATCH] Update README with API setup instructions --- README.md | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8abc0ee..086cfb3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,32 @@ -# Django-REST-API---Build-an-API-from-Scratch -Building APIs using Django Rest Frameworks that developers can be able to consume when building up there own applications.This is a step by step process from scratch. -#Pip Install DjangoRestFramework -#Pip Install Django -#Create the APIs on the Models sections, serializers, views and the urls.py. (serializers describe the process of going from the python object to JSON) -#Run them as you continue testing through by using this methods #GET #PUT #POST #DELETE #UPDATE all based on the fundamental ways of how you want to approach it. You'll run this on DJANGO REST FRAMEWORKS. -#Test the already built APIs on Postman. \ No newline at end of file +# Building APIs Using Django Rest Framework + +This guide provides a step-by-step process to build APIs from scratch using Django Rest Framework, making them easy for other developers to consume when creating their own applications. + +### Steps + +1. **Install Required Packages** + ```bash + pip install djangorestframework + pip install django + ``` + +2. **Create APIs in Django** + - Define the APIs in the `models.py`, `serializers.py`, `views.py`, and `urls.py` files. + - **Serializers**: Describe the process of converting Python objects to JSON format. + +3. **Test the APIs Continuously** + - Use the following HTTP methods to interact with the API: + - `GET` + - `POST` + - `PUT` + - `DELETE` + - `UPDATE` + - Approach each method based on the specific requirements of your project. + +4. **Run the APIs in Django Rest Framework** + - Ensure Django Rest Framework is set up correctly and your APIs are running smoothly. + +5. **Test the APIs on Postman** + - Use Postman to test the APIs and verify their functionality. + +--- \ No newline at end of file