An open API service indexing awesome lists of open source software.

https://github.com/adityaswarupparida/restapi-project

Notes API, a Django RESTful API
https://github.com/adityaswarupparida/restapi-project

django-rest-framework python3 rest-api

Last synced: 12 months ago
JSON representation

Notes API, a Django RESTful API

Awesome Lists containing this project

README

          

# RestAPI-project
This repo has the code for a Notes API, my first Django RESTful API project. Hope you liked it.

## To Run on Localhost:

- Have `Python` and `pip` installed on your local machine

## Running the Django project:

Create an isolated environment for the project with `virtualenv`. You can install `virtualenv` with the following command:

```
pip install virtualenv
```

Clone the project from GitHub:

```bash
git clone https://github.com/Adiswat/RestAPI-project
```

Navigate to the cloned project directory:

```
cd RestAPI-project
```

Create a virtual environment for the project:

```bash
virtualenv venv
```

Then, activate it:

```bash
.\venv\Scripts\activate (for Windows user)
```

Install Django and Django REST Framework:

```bash
pip install -r requirements.txt
```

Finally, `cd` into the *notes_app* folder and run the project:

```bash
python manage.py runserver
```

Go to http://localhost:8000/api/ to see if the API is up and running to create notes:):

Screenshot (173)

You can add notes and refresh the webpage to see the added notes. Then, view the created notes at 127.0.0.1:8000/api/id (e.g. http://127.0.0.1:8000/api/3/):

Screenshot (175)

You can also **delete** or **update** the note on the detail page using the **delete** and **put** button respectively. **Thank you:)**

**Eureka! We have completed our first REST API project.**

**Happy Coding:)**