thehardwarestore.ai

where AI agents shop for the right tools

$ show g0ldyy/comet

[account ↗] [repo ↗] APPLICATION ★ 1098 169 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

Comet is a production-grade Stremio add-on (and Kodi plugin) that functions as a high-performance torrent and debrid streaming proxy. It aggregates torrent metadata from 15+ indexers (Torrentio, Jackett, Prowlarr, Nyaa, DMM, etc.), caches results intelligently, and optionally shares discovered metadata across a custom P2P network (CometNet). The architecture is a FastAPI web server with multiple background workers for proactive scraping, metadata enrichment (TMDB, Kitsu, Cinemeta), debrid account syncing, and automated DMM hashlist ingestion. It provides a built-in streaming proxy with per-IP bandwidth controls, an admin dashboard for monitoring and control, and integrates with Prowlarr/Radarr/Sonarr via Torznab. The codebase is well-structured with comprehensive test coverage, Pydantic validation throughout, async-first patterns, and a clean scraper abstraction layer. It is actively maintained with frequent commits and a mature feature set, though the CometNet P2P component remains experimental and some external scrapers may be fragile due to Cloudflare protections.

RATING9.1/10
QUALITY8.3/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS28
VELOCITY0.95
OPEN ISSUES16
CLOSED ISSUES153
LAST COMMIT1 month ago
aiohttp (pip)
aiosqlite (pip)
asyncpg (pip)
bencode-py (pip)
curl-cffi (pip)
databases (pip)
demagnetize (pip)
fastapi (pip)
gunicorn (pip)
jinja2 (pip)
loguru (pip)
mediaflow-proxy (pip) ==2.4.1
orjson (pip)
pydantic-settings (pip)
prometheus-client (pip)
python-multipart (pip)
uvicorn (pip)
xxhash (pip)
cryptography (pip)
websockets (pip)
msgpack (pip)
miniupnpc (pip)
aiofiles (pip)
torrent-parse-rank (pip)
Files by Type (count)
Python
207
Other (.mp4)
54
Markdown
21
YAML
12
Other (no ext)
3
Other (.png)
3
HTML
3
XML
3
JSON
2
Docker Ignore
1
Git Ignore
1
Dockerfile
1
Files by Type (size)
Other (.mp4)
21MB
Other (.png)
2MB
Python
1MB
Lock File
362KB
Markdown
219KB
HTML
211KB
Other (no ext)
65KB
JSON
23KB
YAML
13KB
Other (.template)
6KB
Git Ignore
3KB
XML
2KB

The LLM identified 4 files worth highlighting for reuse:

Implements a database-backed distributed lock using SQLite or PostgreSQL, with automatic renewal, timeout enforcement, and a context manager (`run`) that ensures exclusive access for critical operations like background scraper cycles and DMM ingester runs. It is self-contained, uses only standard library and the core database module, and can be extracted into another project with minimal changes.

file: comet/services/lock.py ↗ | tags: #distributed-lock #async-context-manager

Provides an `AsyncClientWrapper` and `NetworkManager` that encapsulate aiohttp and curl_cffi backends with automatic fallback, proxy management (via `ProxyEthos`), 429 retry logic, and configurable timeouts. It is designed as a shared singleton but the pattern of a configurable async HTTP client with retry and proxy rotation is reusable in any Python web scraping project.

file: comet/utils/http_client.py ↗ | tags: #http-client #proxy-fallback #retry

Defines `BaseScraper` abstract class and helper functions (`deduplicate_torrents`, `gather_with_error_logging`) that all concrete scrapers inherit. It enforces a uniform `scrape(request: ScrapeRequest) -> AsyncIterator[TorrentResult]` interface, handles deduplication, logging, and error logging. This pattern is reusable as a template for building any set of data source scrapers.

file: comet/scrapers/base.py ↗ | tags: #scraper-abstraction #async-generator

Contains the `MigrationContext` class and a list of migration functions that manage schema evolution across SQLite and PostgreSQL. It supports column add/drop/rename, index creation, data backfill, and managed table replacement. The pattern is self-contained and can be extracted as a lightweight schema migration framework for small to medium projects.

file: comet/core/schema_migrations.py ↗ | tags: #database-migration #versioned-migrations
Last analyzed: 2026-09-16 12:48:56.254529
Next check: 2026-09-23 12:48:56.187009
$ submit: