fastapi-python
यह क्या करती है
यह स्किल AI को FastAPI, एक Python फ़्रेमवर्क, से वेब API बनाने के सर्वोत्तम तरीके सिखाती है। यह उन डेवलपर के लिए है जिन्हें साफ़ और अच्छी तरह संरचित बैकएंड कोड चाहिए।
कब इस्तेमाल करें
- ✓जब आप FastAPI से Python में वेब API बना रहे हैं।
- ✓जब आपको API के लिए type-checked request और response मॉडल चाहिए।
- ✓जब आपको async एंडपॉइंट चाहिए जो बहुत सारे अनुरोध कुशलता से संभालें।
Skill का लिंक
https://github.com/debpalash/VoiceStudio/blob/main/.agents/skills/fastapi-python/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मुझे एक FastAPI एंडपॉइंट बनाकर दीजिए जिससे यूज़र validated इनपुट के साथ टास्क बना और सूचीबद्ध कर सकें।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI छोटे, केंद्रित फ़ंक्शन लिखता है और डेटा जाँचने के लिए Pydantic मॉडल इस्तेमाल करता है। त्रुटि वाले मामले पहले संभालता है और हर फ़ंक्शन के अंत में मुख्य तर्क रखता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
FastAPI Python
You are an expert in FastAPI and Python backend development.
Key Principles
- Write concise, technical responses with accurate Python examples
- Favor functional, declarative programming over class-based approaches
- Prioritize modularization to eliminate code duplication
- Use descriptive variable names with auxiliary verbs (e.g.,
is_active,has_permission) - Employ lowercase with underscores for file/directory naming (e.g.,
routers/user_routes.py) - Export routes and utilities explicitly
- Follow the RORO (Receive an Object, Return an Object) pattern
Python/FastAPI Standards
- Use
deffor pure functions,async deffor asynchronous operations - Use type hints for all function signatures. Prefer Pydantic models over raw dictionaries
- Structure: exported router, sub-routes, utilities, static content, types (models, schemas)
- Use ordinary Python control flow; prefer readability over compressed one-line conditionals
Error Handling
- Handle edge cases at function entry points
- Employ early returns for error conditions
- Place happy path logic last
- Avoid unnecessary else statements; use if-return patterns
- Implement guard clauses for preconditions
- Provide proper error logging and user-friendly messaging
FastAPI-Specific Guidelines
- Use functional components (plain functions) and Pydantic models for input validation
- Declare routes with clear return type annotations
- Prefer lifespan context managers for managing startup and shutdown events
- Leverage middleware for logging, error monitoring, and optimization
- Use HTTPException for expected errors and model them as specific HTTP responses
- Apply Pydantic's BaseModel consistently for validation
Performance Optimization
- Minimize blocking I/O. In
async defhandlers, use awaitable database/API clients; put synchronous SQLite or other blocking work in synchronous routes or explicitly offload it - Implement caching with Redis or in-memory stores
- Optimize Pydantic serialization/deserialization
- Use lazy loading for large datasets
Key Conventions
- Rely on FastAPI's dependency injection system
- Prioritize API performance metrics (response time, latency, throughput)
- Structure routes and dependencies for readability and maintainability
Dependencies
FastAPI, Pydantic v2, asyncpg/aiomysql, SQLAlchemy 2.0
अक्सर पूछे जाने वाले सवाल
FastAPI क्या है?
यह वेब API बनाने के लिए एक Python फ़्रेमवर्क है।
यहाँ Pydantic किसलिए है?
स्किल इनपुट और आउटपुट जाँचने के लिए कच्चे dictionary के बजाय Pydantic मॉडल पसंद करती है।
फ़ाइलों के नाम कैसे रखे जाते हैं?
स्किल lowercase नाम और underscore इस्तेमाल करती है, जैसे user_routes.py।
जानकारी
लेखक का मूल विवरण
Expert in FastAPI Python development with best practices for APIs and async operations
repo: debpalash/VoiceStudio
लोकप्रियता
- GitHub स्टार
- 99k
- रैंकिंग में स्थान
- #1287
- लाइसेंस
- AGPL-3.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
vite
99kयह आपके एजेंट को Vite पर विशेषज्ञ मार्गदर्शन देती है, वेब ऐप के तेज़ बिल्ड टूल पर, जिसमें सेटअप, environment variables और प्रदर्शन शामिल हैं।
voicestudio
99kयह आपके एजेंट को सहेजी गई आवाज़ों से भाषण बनाने, ऑडियो ट्रांसक्राइब करने और लोकल VoiceStudio ऐप के ज़रिए डबिंग या नैरेशन के कदम चलाने देती है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।