Git Product home page Git Product logo

python-deliveryservice's Introduction

python-deliveryservice

python, typer, docker

Setup

  1. Please download repo git clone https://github.com/coderj001/python-deliveryservice.git and cd python-deliveryservice
For simple python install (Please make sure python >= 3.9 installed)
  1. Run make venv to have virtualenv,Now run make build
  2. Now run python cli.py --help
For Docker (Please make sure docker is installed)
  1. Run docker_build to install and build docker image
  2. Now run docker run --rm -it cli --help

Application have appropriate guide use --help to get more info.
Why use docker? Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.

How to run

For cost

python cli.py cost --base-delivery-price base_delivery_cost --package-details "pkg_id1 pkg_weight1_in_kg distance1_in_km offer_code1" --package-details "pkg_id2 pkg_weight2_in_kg distance2_in_km offer_code2" ...

example,

python cli.py cost --base-delivery-price 100 --package-details "PKG1 5 5 OFR001" --package-details "PKG2 15 5 OFR002" --package-details "PKG3 10 100 OFR003"

For time

python cli.py time --base-delivery-price base_delivery_cost --package-details "pkg_id1 pkg_weight1_in_kg distance1_in_km offer_code1" ... --vehicle-details no_of_vehicles max_speed max_carriable_weight

example,

python cli.py time --base-delivery-price 100 --package-details "PKG1 50 30 OFR001" --package-details "PKG2 75 125 OFFR0008" --package-details "PKG3 175 100 OFFR003" --package-details "PKG4 110 60 OFFR002" --package-details "PKG5 155 95 NA" --vehicle-details 2 70 200

Test

Run All testcase by make test

Future Updates

  1. time est is not working properly need to config
  2. Added sqlalchemy to have db connect
  3. Build rest api around it

python-deliveryservice's People

Contributors

coderj001 avatar

Watchers

 avatar

python-deliveryservice's Issues

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.