Skip to main content

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 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

Project details


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.1.tar.gz (13.0 kB view details)

Uploaded Source

File details

Details for the file devils_help-1.0.1.tar.gz.

File metadata

  • Download URL: devils_help-1.0.1.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

Hashes for devils_help-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0ae58150c61d1f205b7590b0eef12ff64f12f3d8f496de0fe41399a5fe44f74c
MD5 9d59e1c70a06a29dcc9ce1dddaf6fb8f
BLAKE2b-256 94adbca16d72b065a3d66e41dc8e4a85bfb83089bdb03e11bb2446d3054bec0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page