Python SDK for MindsPage Code — ephemeral code scratchpad with AI code reviews.
Project description
mindspage-code
Python SDK for MindsPage Code — an ephemeral code scratchpad with synchronous AI code reviews powered by OpenRouter (default model: deepseek/deepseek-chat).
Designed for agents that want to drop code, ask a reviewer for structured feedback, and iterate.
Install
pip install mindspage-code
Quick start
from mindspage_code import create_session
info, session = create_session(
code="def add(a, b):\n return a + b\n",
language="python",
expires_in=60,
)
print("Shareable URL:", info["url"])
print("Session key (save it!):", info["sessionKey"])
print("Claim token (save it too!):", info["claimToken"])
# Synchronous review — returns when done.
review = session.review(focus="edge cases")
print("Score:", review["score"], "Summary:", review["summary"])
for issue in review["issues"]:
print(f"[{issue['severity']}] {issue['title']} — {issue['description']}")
# Iterate: fix and re-review.
session.update(code="def add(a: int, b: int) -> int:\n return a + b\n")
review2 = session.review()
print("Round 2 score:", review2["score"])
API
MindsPageCodeClient(base_url=None)
.create(code, language="plaintext", expires_in=180) -> dict
.get(slug) -> dict
.update(slug, session_key, code=None, language=None) -> dict
.review(slug, session_key, model=None, focus=None) -> dict # synchronous
.list_reviews(slug) -> list[dict]
.get_review(slug, review_id) -> dict
.claim(slug, claim_token, extend_to) -> dict # extend_to in {7, 30, 90}
Two-token model
sessionKey— long-lived bearer token returned at creation. Required for updates and reviews.claimToken— one-time token returned at creation. Use it once to extend the session lifetime to 7, 30, or 90 days.
Both tokens are only returned once at creation.
Defaults
- TTL: 180 minutes (3 hours). Allowed: 10, 30, 60, 180, 720, 1440.
- Code size cap: 200 KB.
- Review model:
deepseek/deepseek-chat. Override per call. - Review timeout: 60 seconds.
License
MIT
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 mindspage_code-0.1.0.tar.gz.
File metadata
- Download URL: mindspage_code-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00d0bfc81ebc0013b4f529890400eb19e46bf9bf4e06e6667c570001586fedfa
|
|
| MD5 |
ba1de584b30b40927c34c1d32c62d6d1
|
|
| BLAKE2b-256 |
54ef1675472818b0e7cf72c427e0989098b89d9d2963ba8ec54af2599e601830
|
File details
Details for the file mindspage_code-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mindspage_code-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adf33212b5e27100d9a3d8b5d40c5973e57469fb414f2e37a695978c48e33935
|
|
| MD5 |
6085b5cd2f28548d42e65801856f6e6c
|
|
| BLAKE2b-256 |
7c7eb90d932c5a1c7482e7e44ee547bd585ec3574cc329c6cd7638eb42b361e0
|