Skip to content

This repository includes endpoints, models, serializers, and views for robust CRUD operations, facilitating the organized handling of vendors' information and order processing.

Notifications You must be signed in to change notification settings

basheeromy/Vendor-management-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vendor-management-api

Vendor Management API

This repository contains the code for a Vendor Management API designed to handle various vendor-related operations.

API Documentation.

The API endpoints and their functionalities are thoroughly documented using Swagger. You can explore and test the API endpoints interactively using Swagger UI.

To access the API documentation, navigate to http://localhost:8000/api/docs after running the application. This URL will direct you to the Swagger interface where you can find detailed information about each endpoint, request parameters, response formats, and even test the API functionality directly within the interface.

Getting Started

Clone this repository.

git clone https://github.com/basheeromy/Vendor-management-api.git

move to the cloned directory.

Setup virtual environment.

python3 -m venv venv

source venv/bin/activate

Set up the project dependencies.

pip install -r requirements.txt

Install development dependencies if needed.

pip install -r requirements.dev.txt

Generate a new secret key.

here is a way to generate secret key

open terminal.

python3

>>> import secrets

>>> print(secrets.token_urlsafe())

copy the generated secret key

>>> exit()

Move to project directory.

cd vendor_app

Create .env file in the project root directory.(where settings.py file exists) and paste SECRET_KEY=<secret_key>

Apply migrations

( move to the directory which includes manage.py file )
python manage.py makemigrations

python manage.py migrate

Create super user to access admin interface.

python manage.py createsuperuser

Use the bellow given command to run the server.

python manage.py runserver

Unit tests

By incorporating efficient unit tests into our application, we're equipped to execute them using the following command:
python manage.py test

Linting

If we have installed the dev dependencies, we can use linting tool with the help of following command to check pep8 standard.
flake8

Details of Dependencies.

Python version 3.11.6

Framework ~ Django==4.2.7


Access http://localhost:8000/api/docs to explore the API documentation. Feel free to use this API to manage vendors efficiently!

Order Related API endpoints. Swagger_Order

Vendor Related API endpoints. Swagger_Vendor

About

This repository includes endpoints, models, serializers, and views for robust CRUD operations, facilitating the organized handling of vendors' information and order processing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages