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 yourLEETCODE_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
watchis 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
- docs/ARCHITECTURE.md — data flow, module responsibilities, and every place live API behavior diverged from initial assumptions.
- docs/DEVELOPER.md — dev setup, project layout, running checks.
- docs/FAQ.md
- docs/TROUBLESHOOTING.md
- CONTRIBUTING.md
- CHANGELOG.md
- PLAN.md — the running decision log from this project's initial build.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fff969c8f5beec83165f6f00c71ee6978d3a1e99c6d612625bc9a9a661368e9
|
|
| MD5 |
1ca31f6c286eaa4bf6383496455c55aa
|
|
| BLAKE2b-256 |
2d03aa7aa570fa89152fb57b663431a63c76ff06f43a90b4c4ab64d6ad413be7
|
Provenance
The following attestation bundles were made for leetvault-0.1.0.tar.gz:
Publisher:
publish.yml on priyadip/LeetVault
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
leetvault-0.1.0.tar.gz -
Subject digest:
2fff969c8f5beec83165f6f00c71ee6978d3a1e99c6d612625bc9a9a661368e9 - Sigstore transparency entry: 2143442898
- Sigstore integration time:
-
Permalink:
priyadip/LeetVault@911924ffe434d161532f007edc0b57ba74773cfb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/priyadip
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@911924ffe434d161532f007edc0b57ba74773cfb -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5ae25bd7db678acc943a653aac712dbe73f8cbd5e5c78eb3b529bfc48874842
|
|
| MD5 |
0cad52988b8d52074888d769ddec78ed
|
|
| BLAKE2b-256 |
01187cf43e3fb3b574cf03b5c9b33fec5ef78239f72128bdac9e584d63af8e32
|
Provenance
The following attestation bundles were made for leetvault-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on priyadip/LeetVault
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
leetvault-0.1.0-py3-none-any.whl -
Subject digest:
a5ae25bd7db678acc943a653aac712dbe73f8cbd5e5c78eb3b529bfc48874842 - Sigstore transparency entry: 2143443242
- Sigstore integration time:
-
Permalink:
priyadip/LeetVault@911924ffe434d161532f007edc0b57ba74773cfb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/priyadip
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@911924ffe434d161532f007edc0b57ba74773cfb -
Trigger Event:
push
-
Statement type: