pydantic-models-py
यह क्या करती है
यह tool computer programs में इस्तेमाल होने वाली व्यवस्थित data structures बनाने में मदद करता है, खासकर system के अलग-अलग हिस्सों के बीच (जैसे API के ज़रिए) संवाद के लिए। यह data कैसा होना चाहिए, यह तय करने के लिए 'Multi-Model Pattern' नाम के तरीके का इस्तेमाल करता है।
कब इस्तेमाल करें
- ✓जब तय करना हो कि कुछ नया बनाने के लिए data कैसे भेजा जाएगा।
- ✓जब तय करना हो कि मौजूदा चीज़ को अपडेट करने के लिए data कैसे भेजा जाएगा।
- ✓जब तय करना हो कि response के रूप में data कैसे लौटाया जाएगा।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/pydantic-models-py/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“name, email और creation date fields वाले user के लिए Pydantic model बनाइए, multi-model pattern का पालन करते हुए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह tool Pydantic library का इस्तेमाल करके 'models' बनाता है, जो data को व्यवस्थित करने के blueprint जैसे होते हैं। यह common data के लिए base models और बनाने, अपडेट करने व response के लिए खास models बनाने का सुझाव देता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Pydantic Models
Create Pydantic models following the multi-model pattern for clean API contracts.
Quick Start
Use the inline model patterns below and adapt class names and fields to the actual API contract. Inspect the installed Pydantic version before selecting configuration syntax; these fragments require the imports and application types shown by your project. Do not assume a standalone template file is bundled.
Multi-Model Pattern
| Model | Purpose |
|---|---|
Base |
Common fields shared across models |
Create |
Request body for creation (required fields) |
Update |
Request body for updates (all optional) |
Response |
API response with all fields |
InDB |
Database document with doc_type |
camelCase Aliases
class MyModel(BaseModel):
workspace_id: str = Field(..., alias="workspaceId")
created_at: datetime = Field(..., alias="createdAt")
class Config:
populate_by_name = True # Accept both snake_case and camelCase
Optional Update Fields
class MyUpdate(BaseModel):
"""All fields optional for PATCH requests."""
name: Optional[str] = Field(None, min_length=1)
description: Optional[str] = None
Database Document
class MyInDB(MyResponse):
"""Adds doc_type for Cosmos DB queries."""
doc_type: str = "my_resource"
Integration Steps
- Create models in
src/backend/app/models/ - Export from
src/backend/app/models/__init__.py - Add corresponding TypeScript types
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
अक्सर पूछे जाने वाले सवाल
Pydantic क्या है?
Pydantic एक Python library है जो type annotations की मदद से data की जाँच और उसे व्यवस्थित करने में मदद करती है।
'Multi-Model Pattern' क्या है?
यह data models को अलग-अलग कामों के लिए व्यवस्थित करने का तरीका है, जैसे बनाने, अपडेट करने या response के लिए, ताकि स्पष्टता और एकरूपता बनी रहे।
'camelCase Aliases' किसलिए होते हैं?
इनसे आपके models field names को 'snake_case' (जैसे `workspace_id`) और 'camelCase' (जैसे `workspaceId`) दोनों formats में स्वीकार कर सकते हैं, जिससे integration अधिक लचीला हो जाता है।
जानकारी
लेखक का मूल विवरण
Create Pydantic models following the multi-model pattern for clean API contracts.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #5542
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती 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 करने के लिए उपयोगी है।