Skip to main content

solvekit

Usage

Installation

Install latest from pypi:

$ pip install solvekit

Documentation

Documentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on pypi respectively.

How to use

from solvekit import *

Add a toolbar button by calling add_btn with a name, icon, code snippet, and tooltip. Here’s the simplest case — a single-line Python snippet:

add_btn('dice', 'ii:lucide:dice-5', 'import random; dice_num = random.randint(1,6); print(f"🎲 You rolled a {dice_num}!")', 'Roll a dice!', lang='py')

For longer scripts, use a triple-quoted string. This button picks a random answer and displays it with a short delay:

add_btn('magic8', '🔮', '''
import random
import time
answers = ["It is certain! 🎉","Ask again later 🤔","Don't count on it 😬","Absolutely! ✨","Try again tomorrow 😴","Without a doubt! 🚀"]
print(f"🔮 {random.choice(answers)}")
time.sleep(5)
''', 'Ask the Magic 8-Ball', lang='py')

Buttons can also trigger AI prompts. This one asks the assistant to clean up the code cell above the current cursor position:

add_btn('cleanup', 'ii:lucide:wand-sparkles', '''
await add_msg(content="""Please clean up the code above:

1. **Fastcore docs format**: Add docstrings and a comment after each parameter (each param on its own line)
2. **General cleanup**: Improve naming, simplify logic, remove duplication

Keep the overall structure and behavior the same.""",
msg_type='prompt', run=True)
''', 'Clean up code above', lang='py')

The same pattern works for any reusable prompt — here’s one that polishes prose and formatting:

add_btn('optimize', 'ii:lucide:pencil-line', '''
await add_msg(content="""Please optimize the cell input above:

1. **Clarity**: Make the content clearer and more concise
2. **Structure**: Improve formatting and organization
3. **Grammar & Style**: Fix any grammar issues and improve readability

Keep the original intent and meaning the same.""",
msg_type='prompt', run=True)
''', 'Optimize cell input above', lang='py')

## Next steps

add_btn gives you a single toolbar button — useful, but real workflows need more. Here’s where solvekit is headed:

Dropdown menus. A single toolbar icon that expands into a list of actions, perfect for storing frequently-used prompts.

Token usage bar. A live progress bar showing context window consumption for the current session.

JS helper library. Clean wrappers around solveit internals — solvekit.run_msg(), solvekit.upsert_msg() — so custom buttons are readable and concise, no guessing at private APIs.

Metadata

Release files for solvekit 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solvekit 0.0.1
File Size Uploaded Provenance Actions
solvekit-0.0.1.tar.gz 9.0 kB Without provenance Details for solvekit-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for solvekit 0.0.1
File Interpreter ABI Platform Actions
solvekit-0.0.1-py3-none-any.whl Python 3 none any Details for solvekit-0.0.1-py3-none-any.whl

Total release size: 18.5 kB

Release files / solvekit-0.0.1.tar.gz

Download URL solvekit-0.0.1.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b0705ee2dc365a07843a1111f5a9d4dc1415e699874a83e083e23520fca5d57a
BLAKE2b-256 checksum
How to use checksums
1daf0e9d8834aa39ce9587f6949fb60496248c1ad400ba60c29f9871363d64a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / solvekit-0.0.1-py3-none-any.whl

Download URL solvekit-0.0.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd5edf0ac18fee70242c235617a23b08bbdb58c28f688840dc827749fc3de465
BLAKE2b-256 checksum
How to use checksums
3e0d7653e7f18893230f2f05cf7b106f9f95f2881cc9710234058ac89a60fbb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for solvekit 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page