Skip to content
/ csvapi Public

A simple way to get CSV files exposed over a REST API serving JSON.

Notifications You must be signed in to change notification settings

dtanham/csvapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSV API

Quickly expose a CSV file as a RESTful API - intended to prototype data products given that most organisations can get their hands on CSV exports quickly.

Main setup is done through column_mapping.py, whose headers need to match those in the header row in data.csv.

No provision made for non-ASCII encoding or fancy quoted CSV formats.

Totally unsupported - use at your own risk.

Usage:

virtualenv venv
pip install -r requirements.txt
. venv/bin/activate
FLASK_APP=app.py flask run

Then visit http://localhost:5000/, http://localhost:5000/Leeds, http://localhost:5000/Leeds/2017-05-31 etc. (assuming you're using the sample data.csv).

Edit column_mapping.py to make this work for you. Mapping names must match column headings in data.csv.

About

A simple way to get CSV files exposed over a REST API serving JSON.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages