A Python-based comic book collection tracker with a Flask web app. Metadata is sourced from the Comic Vine API and pricing from eBay, all stored in a local SQLite database.
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtCreate a .env file in the project root:
CV_API_KEY=your_comic_vine_api_key
EBAY_PROD_APP_ID=your_ebay_app_id
EBAY_PROD_CLIENT_ID=your_ebay_client_id
EBAY_PROD_CERT_ID=your_ebay_cert_id
SECRET_KEY=your_flask_secret_key
The project has three independent pipelines:
Finds unmatched books in the database and identifies them via the Comic Vine API.
python ingest.py # first 100 unmatched books
python ingest.py --limit 50
python ingest.py --all
python ingest.py --all --resume # skip rows already identified today (crash recovery)Fetches current eBay listing prices for each book. Skips books priced within the last 30 days. Stops automatically if the eBay daily API quota (5,000 calls) is exhausted.
python pricing.py # first 100 stale books
python pricing.py --all
python pricing.py --limit 50
python pricing.py --force # reprice everything regardless of last update
python pricing.py --title "batman"Pricing uses the median of up to 10 current listings. If no exact-grade listing is found, it interpolates linearly between the nearest available grades above and below. Also automatically tags ungraded books as Candidate where the CGC graded price exceeds the raw price by $50+.
python app.pyOpens at http://localhost:5000. Accessible on your local network at your machine's LAN IP on port 5000.
Features: collection viewer, manual Comic Vine match correction, CSV import, cover image management, multi-user login.
Books you add need:
| Field | Description |
|---|---|
| Title | Series name (e.g. Amazing Spider-Man) |
| Issue | Issue number |
| Grade | Numeric grade (0.5–10.0) |
| CGC | Whether professionally graded (0/1) |
| Variant | Variant/cover designation if applicable |
| Price Paid | Your purchase price |
The pipelines enrich each book with:
| Field | Source |
|---|---|
| Publisher, Volume, Cover Date | Comic Vine |
| Key Issue, Comic Age, Notes | Comic Vine |
| Cover Image | Comic Vine |
| Graded Price, Ungraded Price | eBay Browse API |
| Candidate tag | Computed (graded vs raw price delta) |
python3 -m pytest test_unit.py -v
python3 -m pytest test_unit.py::TestPickBestMatch -v # single class