Skip to main content

Mirror your LeetCode account (accepted submissions + source + metadata) into a normalized SQLite DB and a GitHub repo with an auto-generated README dashboard.

Project description

leetvault

Mirror your LeetCode account (accepted submissions + source code + metadata) into a normalized SQLite database and a GitHub repository with an auto-generated README dashboard.

Sync is account-based, driven by your authenticated LeetCode session — not a browser extension. Your LeetCode account is the single source of truth. Free and open source; the only external services involved are LeetCode and GitHub.

Install

pip install leetvault

Requires Python 3.11+. See docs/DEVELOPER.md for an editable/dev install.

Quickstart

leetvault login                                          # paste LEETCODE_SESSION + csrftoken
leetvault config repo_url https://github.com/you/repo.git # optional: enable GitHub push
leetvault import                                          # one-time full history
leetvault sync                                             # incremental, run anytime
leetvault watch                                             # or: poll automatically

Commands

  • leetvault login — store your LEETCODE_SESSION + csrftoken (and optionally a GitHub PAT) in the OS keyring.
  • leetvault import — full history import of every accepted submission (resumable, one-time per site).
  • leetvault sync — incremental sync of new accepted submissions since the last run.
  • leetvault watch — poll LeetCode and sync automatically (--interval, default 90s).
  • leetvault status — show session validity/expiry and sync state.
  • leetvault logout — remove stored credentials.
  • leetvault config — get/set persistent configuration (repo URL, DB path, dedup window, ...).

What gets stored

A normalized SQLite database (problems, submissions, source code, topics, sync state) plus a disk layout per problem:

Problems/<slug>/
  latest.<ext>          the most recent accepted submission
  history/submission_<id>.<ext>   every kept accepted submission
  metadata.json          difficulty, topics, runtime/memory percentiles, ...
  notes.md                yours - never overwritten once created
README.md                 auto-generated dashboard: progress, streaks, full solutions table

By default, same-day accepted submissions for the same problem are deduplicated (only the newest is kept); pass --keep-all to import/sync to disable that.

Honest limits

  • watch is polling (default 90s, configurable), not a real-time push — LeetCode has no public webhook/streaming API.
  • LeetCode may Cloudflare-challenge automated HTTP clients; leetvault fails gracefully rather than faking success.
  • Storing session cookies for automated access may be against LeetCode's Terms of Service. Use at your own risk, against your own account only.
  • LeetCode has no official API — every endpoint leetvault uses is reverse-engineered and could change without notice.

Docs

License

MIT — see LICENSE.

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

leetvault-0.1.1.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

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

leetvault-0.1.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file leetvault-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for leetvault-0.1.1.tar.gz
Algorithm Hash digest
SHA256 87f20c2ce930a0470d160cd939d68fdc115601e1cbabac7530e0d95a85abc7c8
MD5 535a0af29fb20de6a22aa982ee24011a
BLAKE2b-256 7f1b36f4fd94a6f9355175f3a1e70ebd1292118fa30fde1b361022eb172e050f

See more details on using hashes here.

Provenance

The following attestation bundles were made for leetvault-0.1.1.tar.gz:

Publisher: publish.yml on priyadip/LeetVault

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

File details

Details for the file leetvault-0.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for leetvault-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cbf4a4d32e158661945a6a6db748ac1c5ab49a371ce86743babc3d221cea1891
MD5 d1fc409ea7967af3b2dafa442699ab35
BLAKE2b-256 001c3e6d6ebe7afc81928700cc29acb96ea46462ff419b167efee17b15767d23

See more details on using hashes here.

Provenance

The following attestation bundles were made for leetvault-0.1.1-py3-none-any.whl:

Publisher: publish.yml on priyadip/LeetVault

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