Skip to main content

🔥 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 text or image must 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

Metadata

Release files for devils-help 1.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 devils-help 1.0.1
File Size Uploaded
devils_help-1.0.1.tar.gz 13.0 kB Details

Release files / devils_help-1.0.1.tar.gz

Download URL devils_help-1.0.1.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0ae58150c61d1f205b7590b0eef12ff64f12f3d8f496de0fe41399a5fe44f74c
BLAKE2b-256 checksum
How to use checksums
94adbca16d72b065a3d66e41dc8e4a85bfb83089bdb03e11bb2446d3054bec0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

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