Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-tracker

A GitHub user activity tracker that records profile snapshots over time and stores them as append-only JSON history files. Designed around a small Repository/Fetcher interface so the live API path and the offline demo path are swappable.

Features

  • Fetcher interface with two implementations:
    • GitHubApiFetcher: live GitHub REST API via requests. Guarded: requires a GITHUB_TOKEN (or --token), handles 404 and rate-limit (403) responses, and adds recent public-event activity. Rate-limited by GitHub.
    • FixtureFetcher: reads bundled data/user_fixture.json, so --offline, tests and demos work with no network and no token.
  • SnapshotStore: append-only JSON snapshots under history/<username>.json.
  • CLI: track (fetch + store) and history (list snapshots with deltas).

Quickstart

Offline demo (no network, no token):

pip install -r requirements.txt
python -m github_tracker track alex_dev --offline
python -m github_tracker history alex_dev

Live tracking (needs a personal access token):

set GITHUB_TOKEN=your_token_here
python -m github_tracker track some_user
python -m github_tracker history some_user

Custom history directory: add --history <dir> to either command. The default is history/, which is git-ignored (folders created on first run).

Verify:

python -m pytest -q

Project structure

github-tracker/
  data/user_fixture.json
  src/github_tracker/
    fetcher.py   # Fetcher interface + GitHubApiFetcher + FixtureFetcher
    store.py     # append-only JSON snapshot history
    cli.py       # track / history subcommands
  tests/test_smoke.py
  requirements.txt

License

MIT

About

GitHub user activity tracker recording profile snapshots over time, with offline fixture mode.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages