OpenSantaRosa / food_inspection_api

(Alpha) API for restaurant inspection data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restaurant Inspection API

This is an API to get restaurant inspection information.

It is written in Python, and run as a WSGI application.

Install

Prepare a virtual environment to hold the Python packages listed in requirements.txt:

make venv-food

Activate the virtual environment:

source venv-food/bin/activate (in bash shell)
source venv-food/bin/activate.csh (in csh or tcsh shell)

TODO: explain Elastic Search setup.

Set an ELASTICSEARCH_URL environment variable.

Run the application with gunicorn on localhost:8000:

gunicorn api:app

Examples

Businesses

/foodInspection/v1/businesses.json

optional params:

near=lat,lon 
radius=100  (in meters)


Bounding Box
nw=lat,lon  # top left
se=lat,lon  # bottom right

query=   # text to query by, ex "Subway"

page=0  # the page number
page_size  # number of reseults to return

About

(Alpha) API for restaurant inspection data.


Languages

Language:CSS 45.0%Language:Python 36.5%Language:JavaScript 16.6%Language:Makefile 1.8%