Skip to content

Just a small learning & testing project for myself. It's a containerized Flask + REST & SOAP API for U.S. state facts, featuring a dashboard, Chart.js visualizations, and MariaDB — built for deployment on Raspberry Pi.

Notifications You must be signed in to change notification settings

mbulkeley/statefacts-api

Repository files navigation

State Facts API

Docker Python Platform License Status

State Facts is a containerized REST + SOAP API with a responsive dashboard that provides U.S. state facts and population data. Built with Flask, Spyne, MariaDB, and Chart.js — and deployed on Raspberry Pi.


Features

  • REST API endpoints for querying state info and cities
  • SOAP API with WSDL support via Spyne
  • Dashboard with interactive population charts (Chart.js)
  • MariaDB for storage, with SQL seed scripts
  • Dockerized with separate Dev and Prod setups
  • Ready for CI/CD and deployment on Raspberry Pi

Tech Stack

  • Backend: Flask (REST), Spyne (SOAP), Python 3.9.6
  • Database: MariaDB
  • Frontend: HTML, JavaScript, Chart.js
  • Infra: Docker, Docker Compose, .env secrets

Getting Started

Clone using SSH:

git clone git@github.com:mbulkeley/statefacts-api.git
cd flask-api

Or with HTTPS:

git clone https://github.com/mbulkeley/statefacts-api.git
cd flask-api

Create a .env File

MYSQL_ROOT_PASSWORD=yourpassword
MYSQL_DATABASE=flaskdb
MYSQL_USER=flaskuser
MYSQL_PASSWORD=yourpassword
DB_HOST=db

REST API Endpoints

Method Route Description
GET /states List all states
GET /states?timezone=CST (Coming soon) Filter states by timezone
GET /states/<abbr> State details + top 5 cities
GET /states/<abbr>/cities Top 5 cities only
GET /search?q=keyword (Coming soon) Search by city/state

SOAP API


License

MIT © Michael Bulkeley

About

Just a small learning & testing project for myself. It's a containerized Flask + REST & SOAP API for U.S. state facts, featuring a dashboard, Chart.js visualizations, and MariaDB — built for deployment on Raspberry Pi.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published