Skip to main content

Archive any Reddit user's public history into a local SQLite database you own, and analyze it

Project description

redlens

Archive and analyze public Reddit history, locally. Built on arctic-shift. Three tables (users, posts, comments), one derived analytic, one fetch function, one CLI. Your data stays in a local SQLite file you own.

The name: a lens on public discussion. Today redlens archives and examines users; tracking topics across public discussion is where it's headed.

Install

pip install -e ".[dev]"

Use

redlens sync KimJongFunk              # pull from arctic
redlens analytics KimJongFunk         # print rollup
redlens analytics KimJongFunk --json  # or as JSON
redlens explore                       # browse the DB in your browser

No setup needed — the schema is created (and migrated) automatically on first use.

No API keys are needed — arctic-shift is a free, open mirror. (Optional keys for fresh-data sync via Reddit's official API and for AI profile summaries are coming; the redlens setup wizard ships disabled until they do something.)

Data

Everything lands in one SQLite file, by default in your per-user data directory (~/.local/share/redlens/redlens.db on Linux, ~/Library/Application Support/redlens/redlens.db on macOS).

Point elsewhere with (in order of precedence):

redlens --db /path/to/other.db sync spez      # 1. the --db flag
export REDLENS_DB=/path/to/other.db           # 2. env var

or set it once in ~/.config/redlens/config.toml (3.):

[storage]
db = "/path/to/other.db"

Explore

Browse the database in your browser — tables and row counts, schema, sortable and searchable rows, and a read-only SQL console with preset analyses:

redlens explore                       # opens the default DB, pops a browser
redlens explore --port 9000 --no-browser

The DB is opened read-only, so nothing here can mutate it.

Layout

redlens/     models, db, config, arctic client, ingest, analytics,
                 explore (the DB browser), cli
tests/           pytest, in-memory sqlite, no network

Test

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redlens-0.2.0.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redlens-0.2.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file redlens-0.2.0.tar.gz.

File metadata

  • Download URL: redlens-0.2.0.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for redlens-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7f1a1c18e62b51764996b0deaa258941aa413609aeb8fcc7fd34731968a22469
MD5 a6b51f6ba9e198340517656f7476ea55
BLAKE2b-256 117f441001e3063f21a0191998ea49f318e96cccb1a8fb31091273369905367d

See more details on using hashes here.

Provenance

The following attestation bundles were made for redlens-0.2.0.tar.gz:

Publisher: release.yml on TheWeiHu/redlens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file redlens-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: redlens-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for redlens-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32c0dd2fef54b62a28f6e290938b95700c1204df32bcc758b201031061ad60ed
MD5 e72283efc3ba40e0caa4391f2a04ad5c
BLAKE2b-256 a57f4ab6d38343f590e68c834e7363eddfed3aa47abc7aa880145763e6a69d68

See more details on using hashes here.

Provenance

The following attestation bundles were made for redlens-0.2.0-py3-none-any.whl:

Publisher: release.yml on TheWeiHu/redlens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page