Git Product home page Git Product logo

kwanj-k / ctrim-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 182 KB

Ctrim backend with Django-rest. Ctrim is a business management platform. You can keep track of products, profits, employees and collaborate with other business owners.

Home Page: https://ctrim-api.herokuapp.com/

License: MIT License

Python 96.36% Makefile 0.66% Shell 2.15% Dockerfile 0.73% Procfile 0.10%
django-rest-framework jwt-authentication postgresql

ctrim-api's Introduction

Build Status Coverage Status

Getting started

These instructions will get you a copy of the project up and running in your local machine for development and testing purposes.

Prerequisites

Installing

Setting up the database

  • Start your database server and create your database

Setting up and Activating a Virtual Environment

  • Create a working space in your local machine
  • Clone this repository git clone https://github.com/kwanj-k/ctrim-api.git
  • Navigate to the project directory
  • Create a virtual environment python3 -m venv name_of_your_virtual_environment
  • Create a .env file and put these key=values in it:
source name_of_your_virtual_environment/bin/activate
source venv/bin/activate
export DB_NAME="your_db_name"
export DB_USER="your_postgres_username"
export DB_PASS="your_postgres_password"
export DB_HOST="localhost or any other host name"
export DB_PORT="port_number"
  • Load the environment variable source .env
  • Install dependencies to your virtual environment pip install -r requirements.txt
  • Migrate changes to the newly created database python manage.py makemigrations then python manage.py migrate

Starting the server

  • Ensure you are in the project directory on the same level with manage.py and the virtual environment is activated
  • Run the server python manage.py runserver

Run Tests

-Run your tests pytest --cov-report term-missing --cov=apps -p no:warnings

API Spec

ctrim-api's People

Contributors

kwanj-k avatar dependabot[bot] avatar d-kahara avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

sylviawanjiku

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.