No description
This repository has been archived on 2025-11-23. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
2020-09-27 17:29:03 -07:00
database set ssl to require on db connection 2020-09-06 19:24:02 -07:00
.gitignore setup method to pass in secrets better than having them in plain text, will be using Hashicorp Vault for secrets long term. 2020-09-05 15:22:38 -07:00
api.py removed the work on filte for now, cleaned up files and repo structure. This branch is complete and ready to be merged into main. Also releasing this version to the site. 2020-09-06 19:19:23 -07:00
creds_sample.py setup method to pass in secrets better than having them in plain text, will be using Hashicorp Vault for secrets long term. 2020-09-05 15:22:38 -07:00
LICENSE Initial commit 2020-08-23 02:28:17 +00:00
Pipfile created initial api.py and modified initial table creation and load to have primary key id and date loaded fields. 2020-08-23 19:10:41 -07:00
Pipfile.lock created initial api.py and modified initial table creation and load to have primary key id and date loaded fields. 2020-08-23 19:10:41 -07:00
README.md updated README to reflect new of home of the project 2020-09-27 17:29:03 -07:00

This repo has been forked to its new home Seattle Matrix - API

api.seattlematrix.org

API to help make public data easier to access. Idea started with need for King County, WA COVID-19 data in API format while only having an excel file for source data.

Development Setup

Datastore

I am using Postgresql for the datastore due to what I read about concurrancy over mysql, figured that would be good for an API. During development using a container on my machine.

docker run --rm   --name pg-docker -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data  postgres:11

You can use this command to connect to the postgresql instance in the container.

docker ps # to find the CONTAINER ID
docker exec -it 05b3a3471f6f bash

From the shell login to the db and setup initial user and database

psql -U postgres

Create your creds.py from the creds_sample.py

cp creds_sample.py creds.py

Edit creds.py with correct info for your db.

More info coming soon on using the scripts in database/ to create tables and load them with data.

Development Env.

Project is using Python 3.7

In the project we use pipenv when developing.

pipenv install && pipenv shell

Production

When running on Debian server libpq-dev is required, this is postgresl library.

sudo apt-get install libpq-dev

Data Available