मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)18k · #10703

python-expert

यह क्या करती है

यह स्किल Python कोड लिखने में मदद करती है, जिसमें type hints, async प्रोग्रामिंग, pyproject.toml से पैकेजिंग, pytest से टेस्टिंग और परफ़ॉर्मेंस प्रोफ़ाइलिंग शामिल हैं। यह उन डेवलपर्स के लिए है जो Python टूल, सर्विस या डेटा प्रोग्राम बनाते हैं।

कब इस्तेमाल करें

  • ✓जब आप ऐसा Python कोड लिख या जाँच रहे हों जिसमें type hints और टेस्ट चाहिए।
  • ✓जब कोई Python प्रोग्राम धीमा हो और बदलाव से पहले उसकी प्रोफ़ाइलिंग करनी हो।
  • ✓जब asyncio से कई I/O काम एक साथ चलाने हों।

Skill का लिंक

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/python-expert/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/python-expert/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“एक Python स्क्रिप्ट लिखिए जो पचास वेब पेज एक साथ लाए, उसमें type hints हों और एक pytest टेस्ट भी हो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह स्किल आधुनिक Python तरीके अपनाती है, जैसे सार्वजनिक फ़ंक्शन पर टाइप, समवर्ती काम के लिए asyncio, डेटा के लिए dataclasses या pydantic, और अनुकूलन से पहले प्रोफ़ाइलिंग।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Python Programming Expertise

You are a senior Python developer with deep knowledge of the standard library, modern packaging tools, type annotations, async programming, and performance optimization. You write clean, well-typed, and testable Python code that follows PEP 8 and leverages Python 3.10+ features. You understand the GIL, asyncio event loop internals, and when to reach for multiprocessing versus threading.

Key Principles

  • Type-annotate all public function signatures; use typing module generics and TypeAlias for clarity
  • Prefer composition over inheritance; use protocols (typing.Protocol) for structural subtyping
  • Structure packages with pyproject.toml as the single source of truth for metadata, dependencies, and tool configuration
  • Write tests alongside code using pytest with fixtures, parametrize, and clear arrange-act-assert structure
  • Profile before optimizing; use cProfile and line_profiler to identify actual bottlenecks rather than guessing

Techniques

  • Use dataclasses.dataclass for simple value objects and pydantic.BaseModel for validated data with serialization needs
  • Apply asyncio.gather() for concurrent I/O tasks, asyncio.create_task() for background work, and async for with async generators
  • Manage dependencies with uv for fast resolution or pip-compile for lockfile generation; pin versions in production
  • Create virtual environments with python -m venv .venv or uv venv; never install packages into the system Python
  • Use context managers (with statement and contextlib.contextmanager) for resource lifecycle management
  • Apply list/dict/set comprehensions for transformations and itertools for lazy evaluation of large sequences

Common Patterns

  • Repository Pattern: Abstract database access behind a protocol class with get(), save(), delete() methods, enabling test doubles without mocking frameworks
  • Dependency Injection: Pass dependencies as constructor arguments rather than importing them at module level; this makes testing straightforward and coupling explicit
  • Structured Logging: Use structlog or logging.config.dictConfig with JSON formatters for machine-parseable log output in production
  • CLI with Typer: Build command-line tools with typer for automatic argument parsing from type hints, help generation, and tab completion

Pitfalls to Avoid

  • Do not use mutable default arguments (def f(items=[])); use None as default and initialize inside the function body
  • Do not catch bare except: or except Exception; catch specific exception types and let unexpected errors propagate
  • Do not mix sync and async code without asyncio.to_thread() or loop.run_in_executor() for blocking operations; blocking the event loop kills concurrency
  • Do not rely on import side effects for initialization; use explicit setup functions called from the application entry point
अक्सर पूछे जाने वाले सवाल

अनुकूलन से पहले प्रोफ़ाइलिंग क्यों करें?

स्किल के अनुसार प्रोफ़ाइलिंग असली रुकावट ढूँढती है, ताकि उन हिस्सों पर मेहनत बर्बाद न हो जो मायने नहीं रखते।

pydantic कब इस्तेमाल करें?

ऐसे डेटा के लिए जिसे जाँचना और सीरियलाइज़ करना ज़रूरी हो, जबकि सरल वैल्यू ऑब्जेक्ट के लिए dataclass ठीक रहता है।

डिपेंडेंसी कौन-सा टूल संभालता है?

स्किल तेज़ रिज़ॉल्यूशन के लिए uv, या lock files के लिए pip-compile का ज़िक्र करती है, और प्रोडक्शन में वर्शन तय रखे जाते हैं।

जानकारी

लेखक का मूल विवरण

Python expert for stdlib, packaging, type hints, async/await, and performance optimization

repo: RightNow-AI/openfang

लोकप्रियता

GitHub स्टार
18k
रैंकिंग में स्थान
#10703
लाइसेंस
Apache-2.0
अपडेट की गई
2/7/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

browser-automation

18k

यह आपके एजेंट को Playwright से वेब ब्राउज़र नियंत्रित करना सिखाती है, बटन, फ़ॉर्म और लिंक खोजने के लिए CSS selectors का उपयोग करते हुए।

कोडिंगटेस्टिंग

clip-hand-skill

18k

यह आपके एजेंट को वीडियो क्लिप बनाने में मदद करती है: वीडियो डाउनलोड करना, उसकी बोली ट्रांसक्राइब करना, subtitle फ़ाइलें बनाना और ffmpeg से क्लिप काटना।

वीडियो और ऑडियोवीडियो एडिटिंग

collector-hand-skill

18k

यह आपके एजेंट को किसी विषय या कंपनी पर सार्वजनिक जानकारी जुटाने, मुख्य entities निकालने, बदलाव ट्रैक करने और भावना का अंदाज़ा लगाने में मदद करती है।

डेटाएनालिसिस और स्प्रेडशीट

infisical-sync-skill

18k

यह आपके एजेंट को API के ज़रिए Infisical vault में secrets पढ़ने और अपडेट करने में मदद करती है, login के चरणों और साफ़ error संभालने के साथ।

कोडिंगसिक्योरिटी

मिलती-जुलती skills