Skip to content
Prompt

dingo — Cursor Rules

by MigoXLab

AI Summary

A Cursor-integrated coding standard guide for the Dingo SDK that enforces PEP 8 conventions, type hints, and proper lazy-import patterns for optional dependencies. Developers building with or contributing to Dingo benefit from consistent, maintainable Python code patterns.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "dingo — Cursor Rules" prompt rules to my project.
Repository: https://github.com/MigoXLab/dingo

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Python coding conventions for the Dingo SDK

Code Style

• Follow PEP 8 (enforced by pre-commit hooks) • Use type hints for function signatures • Use @classmethod for evaluator eval() methods • Prefer getattr(obj, 'field', default) over direct attribute access for optional Data fields

Import Rules

• Core deps (numpy, pydantic, requests, etc.): top-level imports OK • Optional deps (pyarrow, transformers, boto3, sqlalchemy, cv2, fasttext, etc.): must use lazy imports inside methods with clear ImportError messages: `python

Correct — lazy import with helpful error

def load_data(self): try: import pyarrow.parquet as pq except ImportError: raise ImportError("pyarrow is required for Parquet support. Install: pip install dingo-python[parquet]")

Wrong — top-level import of optional dep

import pyarrow.parquet as pq `

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 1mo ago
Active
Adoption100+ stars on GitHub
658 ★ · Growing
DocsMissing or thin
Undocumented

GitHub Signals

Stars658
Forks67
Issues7
Updated1mo ago
View on GitHub
Apache-2.0 License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more