ashleymcnamara / uber_stats

Uber statistics app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UberStats is a statistics app where users can log in with their Uber accounts and are provided with insights into their ride history.

UberStats was created by [Ashley McNamara](<ashleymcnamara1@gmail.com). You can connect with Ashley on LinkedIn and Twitter

Table of Contents

Technologies

UberStats is built on a Flask server (written in Python) and uses an encoding technique called base64 the application seamlessly integrates with Uber and adopts a modernized UI.

Tech Stack:

(Dependencies are listed in requirements.txt.)

Features

####Login with Uber

User login is handled through Uber's OAuth 2.0, following the client-side authorization flow.

####What does UberStats OAuth flow look like?

For a user to access UberStats content and request in-app Uber services, the app needs authorization from Uber and redirects the user to Uber's Authorization server, where the user is asked to authenticate (if not already logged in) and then authorize the requested permissions. After successfully being granted access, the app is redirected from Uber to the redirect uri address, including an access token that can be used directly by the app to request information or perform operations on behalf of the user.

The access token is then encrypted and stored on the Flask session, and the user's subsequent login will not prompt for the authorization dialog if the user is logged in and has previously approved the same permissions. For more, please see the Uber API documentation.

####User Profile and Avatar

Upon a user's successful login through Uber, the app accesses the user's Uber profile and greets the user with the user's name and Uber profile picture on top of the results page. Next, you'll see the number of cities where Uber was used, number of rides taken and in different product types, miles travelled in Uber, total time spent waiting for an Uber, and total time spent in an Uber.

If you want to get a copy of this project up and running on your local machine for development and testing purposes, here are the steps

####Install

Clone this repository.

$ git clone https://github.com/ashleymcnamara/uber_stats

Create a virtual environment for the project.

$ virtualenv env

Activate the virtual environment.

$ source env/bin/activate

Install dependencies.

$ pip install -r requirements.txt

To enable the Uber functionality, you should set up your own developer accounts and have your own sets of API keys and tokens.

Deployment

Deployment details to come!

Version 1.0

Future features to come:

  • Profile Picture
  • Leader board
  • More testing

Author

Ashley McNamara (Github: ashleymcnamara) is a Developer Advocate living in Austin Texas.

License

This project is licensed under the MIT License. See the LICENSE.txt file for details.

About

Uber statistics app

License:MIT License


Languages

Language:Python 44.1%Language:HTML 34.3%Language:CSS 21.6%