Skip to content

odedbotzer/open-budget-data-api

 
 

Repository files navigation

Open Budget Data Api

Travis Coveralls

This is the API for the Open Budget data. You can perform Database Queries and download data

Getting started

Create a virtual environment (if necessary) and install the requirements

pyvenv venv
source venv/bin/activate
pip install -r requirements.txt

Set the Python Path

export PYTHONPATH=.:$PYTHONPATH

Instead of setting up the database locally, you can use a different database host

export DATABASE_URL=<db_url>

Check the current hosted database url (SQLALCHEMY_DATABASE_URI in the config.py) At the time of writing it was postgresql://readonly:readonly@data-next.obudget.org:5432/budgetkey

Start app through unicorn

gunicorn open_budget_data_api.main:app

Now you can browse to the app, for example:

http://localhost:8000/api/query?query=select * from raw_budget

Build package

python setup.py build

Build Docker

docker build .

Contributing

Please read the contribution guideline:

How to Contribute

Thanks!

About

Flask based data api for openspending

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.2%
  • Dockerfile 1.7%
  • Other 1.1%