A password-locked personal AI assistant to solve coding problems from text or screenshots
Project description
🔥 devils-help
Your Personal AI Devil — a password-locked coding assistant powered by Groq's Llama 4 Scout model.
devils-help solves competitive programming problems and software engineering challenges directly from plain text or screenshots. The Groq API key is pre-baked into the package — you only need a password to unlock it.
Installation
pip install devils-help
Requires Python ≥ 3.9
Quick Start
import devil
# 1. Authenticate — raises AuthenticationError on wrong password
cn = devil.connect(pwd="devil123")
# 2. Solve from plain text (returns Python code only)
cn.ask(text="Find the longest increasing subsequence", mode="code", lang="python")
# 3. Explain a problem from a screenshot
cn.ask(image="problem.png", mode="explain")
# 4. Full solution — explanation + code, saved to a file
cn.ask(
text="Solve this",
image="q.png",
mode="both",
lang="cpp",
prompt="Optimize for O(n log n)",
save="output/solution.txt",
)
ask() Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text |
str |
Optional* | The problem description as a plain-text string. |
image |
str |
Optional* | File path to a screenshot or image of the problem (.png, .jpg, .webp). |
mode |
str |
Optional | Response style — "code", "explain", or "both" (default: "both"). |
lang |
str |
Optional | Target programming language, e.g. "python", "cpp", "java". |
prompt |
str |
Optional | Additional custom instruction appended to the system prompt. |
save |
str |
Optional | File path to save the response to (parent dirs are created as needed). |
* At least one of
textorimagemust be provided. Both can be used together.
Modes
| Mode | What it does |
|---|---|
"code" |
Returns only raw executable code — no explanations, no markdown, no backticks. |
"explain" |
Returns a structured explanation — summary, observations, algorithm, complexity — no code. |
"both" |
Returns an explanation followed by complete code, separated by --- CODE ---. |
Supported Image Formats
| Extension | MIME type |
|---|---|
.png |
image/png |
.jpg / .jpeg |
image/jpeg |
.webp |
image/webp |
Notes
- API key — Pre-configured inside the package. End-users never need to set or see it.
- Password — Required to access the assistant via
devil.connect(pwd=...). The password is never stored in plaintext — only its SHA-256 hash is used for verification. - Model — Uses Groq's
meta-llama/llama-4-scout-17b-16e-instruct(vision-capable).
License
MIT © 2025 Madhav
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
devils_help-1.0.0.tar.gz
(13.0 kB
view details)
File details
Details for the file devils_help-1.0.0.tar.gz.
File metadata
- Download URL: devils_help-1.0.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2c5918b1ce2b92d5bf89b8b8283003f2e6b11402dcc70fcfad4c22f852c390d
|
|
| MD5 |
cb15080754e52e41ebe0e1b042aaf83f
|
|
| BLAKE2b-256 |
266e752202b2b0d86abcbc2592aca8f2e96413fe4351d9b68382a19d6914c0d0
|