Git Product home page Git Product logo

rideshare's Introduction

Rideshare

Rideshare is a small CLI ride booking and sharing app developed using poetry and typer

Requirements

Requirements can be found here

Design and models

Models and design can be found here

Usage

==========

rideshare

 Usage: rideshare [OPTIONS] COMMAND [ARGS]...

 Ride share is a small ride sharing CLI app

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.                                                                                                                                                      │
│ --show-completion             Show completion for the current shell, to copy it or customize the installation.                                                                                                               │
│ --help                        Show this message and exit.                                                                                                                                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ rides                                                                                                                                                                                                                        │
│ users                                                                                                                                                                                                                        │
│ vehicles                                                                                                                                                                                                                     │
╰───────────

## Registering a user
rideshare users register Anil --phone 7803804265

## Registering a vehicle
rideshare vehicles register Maruti --number KA-19-16633 --owner-id 1

## Offering a ride
rideshare rides offer --driver-id 1 --source "Mysore" --destination "Ooty" --seats 5 --vehicle-id 6 --fare 200

## Searching a ride
rideshare rides search --source Bangalore --destination Ooty --seats 2 --strategy Most_cheapest

  RideId   Source      Destination   Driver name   Driver phone   Vehicle name   Ride fare   Seats  
 ────────────────────────────────────────────────────────────────────────────────────────────────── 
  2        Bangalore   Ooty          Rahul         7003404265     Activa         500         20     



  Total fare   Available seats  
 ────────────────────────────── 
  500          20


Do you want to select the rides ? [y/N]: y
Enter user ids seprated by comma of passengers to continue: 4,5
Your ride has been confirmed!

## Ending a ride
rideshare rides end 6

## Printing ride stats
rideshare rides stats

  Person     Rides Offered   Rides Taken  
 ──────────────────────────────────────── 
  John       3               0
  Rahul      1               0
  Rohan      1               0
  Shashank   1               3
  Ankita     0               3
  Suhana     0               2

How to setup and run

  • Install poetry from here
  • Git clone the repo
  • Go to repo directory and run these commands
    poetry install
    poetry shell
  • Start running off the cli commands.

rideshare's People

Contributors

alzahedi avatar

Watchers

 avatar

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.