Skip to main content

Grumpy Python Setup Documentation

1. Quick Start

Step 1: Install the SDK

pip install desicon-grumpy

Step 2: Initialize Grumpy

from grumpy_ai import grumpy

grumpy.init(
    api_key="grp_live_xxxx",   # From your dashboard
    app_name="My App",
    environment="production",  # "production" | "staging" | "development"
    rescue_engine=True,        # Automatically apply AI hotfixes
    level="error"              # "fatal" | "error" | "warning"
)

2. Configuration Options

Python Parameter Node.js / Browser Parameter Type Description
api_key apiKey string Your project API key from the dashboard.
app_name appName string A human-readable name for your application.
environment environment string Current deployment environment: 'production', 'staging', or 'development'.
rescue_engine rescueEngine boolean Set to true to enable automated AI hotfix generation and patching.
level level string fatal

3. The Sensitivity Dialer

The Sensitivity Dialer controls how much noise Grumpy generates. Set it in two places:

  1. SDK: Set level in grumpy.init().
  2. Dashboard: Override per-project in Settings. Server enforces it.

Levels:

  • fatal (Low): Only unhandled crashes.
    grumpy.init({ level: "fatal" });
    
  • error (Medium): Caught exceptions + fatal.
    grumpy.init({ level: "error" });
    
  • warning (High): Everything. Good luck.
    grumpy.init({ level: "warning" });
    

4. Grumpy Rescue Engine

When the Rescue Engine is enabled (via Project Settings), Grumpy doesn't just send you an alert. It instructs your connected AI to generate a functional, sandboxed JavaScript hotfix that fixes the logical error.

This patch is saved to the Grumpy backend. The next time any user loads your client application, the Grumpy SDK automatically fetches all active patches and applies them in memory before your code runs. This means you can hotfix logic errors across the globe with zero downtime, no redeployments, and complete sandboxed safety.

    1. Enable 'Grumpy Rescue Engine' in your Project settings.
    1. Ensure you have an AI Provider configured in settings.
    1. When an unhandled error occurs, Grumpy will generate a <RESCUE_PATCH>.
    1. The SDK downloads and applies this patch on the next client load, silently fixing the bug for everyone else.

Stack Compatibility & Frameworks

The Rescue Engine dynamically patches JavaScript bugs in the browser, but it is fully compatible with ANY backend stack.

Server-Rendered Apps: Even if your backend is Python or PHP, your users still interact with HTML/JS in the browser. Drop the Grumpy JS SDK into your Jinja2, Django, or Blade templates. The Rescue Engine will catch and hotfix frontend JavaScript bugs seamlessly.

<!DOCTYPE html>
<html>
<head>
    <!-- Drop Grumpy before your other scripts -->
    <script src="https://cdn.jsdelivr.net/gh/Desicon-AI/grumpy-cdn@main/grumpy.js"></script>
    <script>
      Grumpy.init({
        apiKey: "{{ GRUMPY_API_KEY }}", // Passed from backend
        appName: "My Web App",
        rescueEngine: true
      });
    </script>
</head>
<body>
    {% block content %}{% endblock %}
</body>
</html>

5. AI Personas

Grumpy speaks in three voices. Choose the one that fits your team culture. Personas are set at the Organization level and apply to all projects.

Grumpy (Sarcastic & Mean) — All Plans

The default. Grumpy roasts your code, insults your variable names, and grudgingly tells you how to fix it. Perfect for teams with thick skin and a sense of humor.

Example: "You passed a string to parseInt and expected magic? Cast your variables, you absolute menace. Here's the fix, don't make me say it twice."

Friendly (Supportive & Positive) — Pro / Team

A warm, encouraging senior dev who wants you to know it's going to be okay. Uses emojis. Celebrates small wins. Great for junior-heavy teams or if HR keeps filing complaints.

Example: "Hey! 👋 Looks like a small type mismatch slipped through — happens to everyone! Here's a quick fix. You're doing great! 🎉"

Professional (Strategic & Objective) — Pro / Team

An enterprise-grade SRE delivering strictly factual root cause analysis and remediation steps. No jokes, no fluff. Designed for large organizations, regulated industries, and teams that need clean audit trails.

Example: "Root Cause: Type coercion failure in paymentAPI.submit(). Remediation: Validate input type before invocation. Patch recommended."

How to configure

All future error analyses across every project in your organization will use the new voice.

1. Dashboard → Settings → Organization Persona
2. Select your preferred persona and click Save

7. Integrations

Bring Your Own AI (BYOAI)

Grumpy works out of the box for free using our massive database of hand-crafted roasts. But if you want AI to suggest actual code fixes, connect any AI provider (OpenAI, Anthropic, Groq, Ollama). We never markup token usage. If your API goes down, Grumpy seamlessly falls back to standard mode.

Dashboard → Settings → Select Provider → Paste Key

Slack Webhooks

Grumpy sends rich, formatted alerts directly to your Slack channels with full stack traces, AI analysis, and severity badges.

1. Dashboard → Settings → Connect Slack
2. Slack → Channel → Settings → Integrations → Add Grumpy

Discord Webhooks

Same rich alerts, same brutal honesty — delivered to your Discord server. Perfect for indie devs and open source projects.

Dashboard → Settings → Connect Discord (automatic)

8. The 'Not My Fault' Engine

Our 'Not My Fault' engine analyzes stack traces. If a crash originated from an external package, we will notify the maintainer of the issue so they can work on it. But we are smart about it. If we notice that the error was caused by missing parameters or incorrect usage by the developer, rather than sending the maintainer a ticket, we notify the developer of the correct use.

For Maintainers

Sign up for a free Grumpy account to claim and track your public npm/pip packages. You only need a paid subscription if you want to use Grumpy to monitor your own applications.

For Developers

Enable this feature within your project settings so that genuine errors from external packages are automatically sent to the maintainers.

Dashboard → Settings → Enable 'Not My Fault'

Metadata

Release files for desicon-grumpy 1.0.4

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

Source distribution (sdist)

Source distribution for desicon-grumpy 1.0.4
File Size Uploaded Provenance Actions
desicon_grumpy-1.0.4.tar.gz 6.4 kB Without provenance Details for desicon_grumpy-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for desicon-grumpy 1.0.4
File Interpreter ABI Platform Actions
desicon_grumpy-1.0.4-py3-none-any.whl Python 3 none any Details for desicon_grumpy-1.0.4-py3-none-any.whl

Total release size: 12.6 kB

Release files / desicon_grumpy-1.0.4.tar.gz

Download URL desicon_grumpy-1.0.4.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ebb93ee57c267a329ea8e233a3ea28fa70698cc033610db0e0d7675bee215355
BLAKE2b-256 checksum
How to use checksums
33e21a8977e39c7a2eb93e7ec724cf3141cfdb536af44b98765224d26dc8d8c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.6

Release files / desicon_grumpy-1.0.4-py3-none-any.whl

Download URL desicon_grumpy-1.0.4-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90ca3a19fba7ecd956ec600790aa7c8ead7915c4d69cc1f0b93d44f95bfa7d7f
BLAKE2b-256 checksum
How to use checksums
08dfdf213f54c6eec29cb965daa5e6c900d0e7e129b5be59e79d59897640892a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.6

Security for desicon-grumpy 1.0.4

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.

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