github-to-sqlite: my tool for creating a SQLite database of data from the GitHub API

Wanted to share a project I’ve been working on for a while now: github-to-sqlite

It’s a command-line utility written in Python that fetches data from the GitHub API (with or without authentication) and saves it to a SQLite database file.

This means you can query your GitHub project data - repositories, issues, issue comments, releases, starred repos and more - using SQL.

I designed the tool to work well with my Datasette web application, which provides a UI and API for browsing SQLite databases and executing queries against them.

The tool includes a scheduled GitHub Action which runs daily and publishes data from a number of my projects as a live demo:

Here’s a SQL view that shows recent releases across ALL of my projects:

And here’s a custom SQL query that shows which GitHub users have starred the most of my repos, and which repos they starred:

@garethr used github-to-sqlite to build a database for exploring cloud native projects - his database can be seen here: - it’s built and deployed by GitHub Actions running in this repo:

I’m finding this to be a really useful way of tying together data across multiple repositories. I hope other people find it useful as well!