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.0.tar.gz (51.3 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.0-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: leetvault-0.1.0.tar.gz
  • Upload date:
  • Size: 51.3 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.0.tar.gz
Algorithm Hash digest
SHA256 2fff969c8f5beec83165f6f00c71ee6978d3a1e99c6d612625bc9a9a661368e9
MD5 1ca31f6c286eaa4bf6383496455c55aa
BLAKE2b-256 2d03aa7aa570fa89152fb57b663431a63c76ff06f43a90b4c4ab64d6ad413be7

See more details on using hashes here.

Provenance

The following attestation bundles were made for leetvault-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: leetvault-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5ae25bd7db678acc943a653aac712dbe73f8cbd5e5c78eb3b529bfc48874842
MD5 0cad52988b8d52074888d769ddec78ed
BLAKE2b-256 01187cf43e3fb3b574cf03b5c9b33fec5ef78239f72128bdac9e584d63af8e32

See more details on using hashes here.

Provenance

The following attestation bundles were made for leetvault-0.1.0-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