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.2.tar.gz (40.7 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.2-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: leetvault-0.1.2.tar.gz
  • Upload date:
  • Size: 40.7 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.2.tar.gz
Algorithm Hash digest
SHA256 e0ebfaa52a4c61d2766a6912123c58c30f03121f29860433847a2e17cf9f88fd
MD5 11e4edc0859e1a49c352149d3e1cc72a
BLAKE2b-256 0dbac5e93b6e8e500c555c76bdff7150ce6d13f31200f90d82252bbef0241b3b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: leetvault-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 25.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea2c63185cb56891c8d26d537d5ca75da828e845194783201a941a857d25c3db
MD5 fafb43a7803415a8cb809f5186dbe3e8
BLAKE2b-256 86e589deeb4101748376f388b4b00827587f31a9e7c5d1b2654c8d1f7ff3eac6

See more details on using hashes here.

Provenance

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