AI SummaryA 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
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts