Skip to content
/ rmw-API Public

It is a REST Application Programming Interface(API) for sharing a ride if persons are traveling in the same direction.

Notifications You must be signed in to change notification settings

Xerrex/rmw-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

license

  • It is a REST Application Programming Interface(API) for sharing a ride if persons are traveling in the same direction.

  • Ride - This is a vehicle with passenger space.

  • Driver - The Creator of the ride is assumed to be the driver.

  • The API is developed in Python/Flask. Consuming the API can be done with any other tech stack that can process JSON endpoints.

Tools used:

  • Python/Flask
  • Object Relation Mapper(ORM)

Table of Contents

#
* Installation & Running
* Testing

Installation

The commands are from a bash terminal

Locally

  • Clone the repository.
    git clone https://github.com/Xerrex/rmw-API.git
    
  • Change into cloned folder.
    cd rmw-API
    
  • Create a virtual environment & activate it.
    python3 -m venv venv && source venv/bin/activate
    
  • Install dependancies
    pip install -r requirements/dev.txt
    
  • Create environment variables.
    • touch .env
      
    • Add this lines to .env & edit values.
      export API_TITLE="RMW-API"
      export API_VERSION="1.0"
      export API_DESCRIPTION="Ride sharing API if you have extra seats"
      export SECRET_KEY="welcome home"
      export API_CONF="development"
      export FLASK_APP="run.py"
      export FLASK_ENV="development"
      

Running and Testing the app.

Running

  • Export the environment variables to the system.
    source .env
    
  • Activate the virtual environment.
    source venv/bin/activate
    
  • Run the App.
    flask run
    
  • View the App.
    • Head over to the Address provided at the terminal

Testing

  • use all the steps from Running up to activating the environment:
    python3 -m unittest discover -s tests
    

About

It is a REST Application Programming Interface(API) for sharing a ride if persons are traveling in the same direction.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages