Code Monkey home page Code Monkey logo

foodtruck's Introduction

San Francisco Food Trucks

A python command line program that prints out an alphabetically ordered list of all food trucks (10 at a time) that are open at that moment.

This program uses the Mobile Food Schedule API, a subset of the The San Francisco Data API found here.

To view assignment requirements, see assignment.md.

Prepping for the program

  • Make sure you have Python 2.7 installed.
    • python --version
    • If no Python is installed, see the offical installation instructions here
  • You will need two external Python libraries, which you can install using Pip.
    • pip install requests
      • This Python addon is used to make HTTP requests to the external API
    • pip install tabulate
      • This will make your food truck console output pretty ๐ŸŒป
  • If you plan to use this API heavily, get an App Token from the San Francisco API website here
    • Place the API token in your environment using the key name FT_APP_TOKEN
      • Edit your shell profile (i.e. .bashrc) to export the new variable
      • Your .bashrc file can be found by typing cd ~ ls -a. Open it in your editor of choice.
      • If it doesn't exist, create it by typing touch ~/.bashrc.
      • Inside your .bashrc, add export FT_APP_TOKEN="<paste from website>"
      • Save and reload your shell by typing source ~/.bashrc
    • The program can be run without a token, but your usage will be throttled.

Executing the program

  • Git clone this repository
  • Navigate into the folder food-trucks in your command line.
    • cd food-trucks
  • Run test (yes singular, sorry) by typing python tests.py
  • Run the program by typing python show-open-food-trucks.py
  • Follow the instructions given in the console for more

foodtruck's People

Contributors

nurlywhirly 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.