6 रिपॉजिटरी
Use of Python descriptor protocols to manage attribute access and modification.
Distinguishing note: Existing candidates refer to GPU, OS file, or platform descriptors, not Python language descriptors.
Explore 6 awesome GitHub repositories matching software engineering & architecture · Python Descriptors. Refine with filters or upvote what's useful.
Pydantic Python के लिए एक डेटा वैलिडेशन लाइब्रेरी और पार्सिंग फ्रेमवर्क है। यह एक टाइप-आधारित स्कीमा वैलिडेटर के रूप में कार्य करता है जो यह सुनिश्चित करने के लिए स्टैंडर्ड Python टाइप एनोटेशन का उपयोग करता है कि इनपुट डेटा पूर्वनिर्धारित स्ट्रक्चरल स्कीमा के अनुरूप है। यह प्रोजेक्ट स्वचालित टाइप कन्वर्जन और वैलिडेशन के माध्यम से रॉ डेटा को टाइप्ड ऑब्जेक्ट्स में पार्स करने की क्षमताएं प्रदान करता है। इसमें डेटा का सीरियलाइज़ेशन और शुद्धता लागू करने के लिए डेटा स्ट्रक्चर्स का वैलिडेशन शामिल है। यह फ्रेमवर्क कई एप्लिकेशन क्षेत्रों को कवर करता है, जिसमें API अनुरोधों का सत्यापन और एप्लिकेशन कॉन्फ़िगरेशन का प्रबंधन शामिल है। यह JSON जैसे रॉ फॉर्मेट्स को स्ट्रक्चर्ड Python ऑब्जेक्ट्स में बदलने की अनुमति देता है।
Uses Python descriptors to intercept attribute access for real-time validation and casting.
This project is a Chinese translation of a technical reference and educational resource focused on the Python interpreter. It serves as a collection of case studies and examples designed to explain unintuitive execution patterns, obscure language behaviors, and the internal mechanics of the Python language specification. The resource translates complex technical explanations from English to Chinese to improve accessibility. It focuses on mapping specific code patterns to internal execution logic, linking observed results to language rules to resolve confusing behaviors. The content covers se
Illustrates how Python descriptor protocols are used to manage attribute access and generate bound methods.
attrs is a Python library that automatically generates initialization, representation, equality, hashing, and ordering methods from declarative class attribute definitions. At its core, it provides a class decorator metaprogramming framework that intercepts class creation to rewrite the class body, producing dunder methods without manual boilerplate. The library includes a comprehensive attribute validation toolkit with built-in validators for type checks, range constraints, regex matching, length limits, and logical composition of validation rules. The library distinguishes itself through it
Implements Python descriptor protocol to control attribute access, initialization, and validation.
यह प्रोजेक्ट व्यावहारिक स्क्रिप्ट्स और संदर्भ गाइडों का एक संग्रह है जो उन्नत Python भाषा सुविधाओं और मुहावरों को प्रदर्शित करता है। यह समवर्तीता (concurrency), मेटाप्रोग्रामिंग, और डेटा संरचना डिज़ाइन जैसी अवधारणाओं में महारत हासिल करने के लिए कोड कार्यान्वयन प्रदान करता है। रिपॉजिटरी में Python ऑब्जेक्ट मॉडल के उदाहरण शामिल हैं, जो कस्टम एट्रिब्यूट एक्सेस, डिस्क्रिप्टर प्रोटोकॉल, और विशेष मेथड ओवरराइड्स को कवर करते हैं। इसमें ऑब्जेक्ट-ओरिएंटेड बॉयलरप्लेट को कम करने के लिए फर्स्ट-क्लास फ़ंक्शंस और डेकोरेटर्स का उपयोग करने वाले डिज़ाइन पैटर्न्स के कार्यान्वयन भी शामिल हैं। कोडबेस क्षमताओं की एक विस्तृत श्रृंखला को कवर करता है, जिसमें इवेंट लूप्स और फ्यूचर्स के साथ एसिंक्रोनस प्रोग्रामिंग, कस्टम अनुक्रमों और जनरेटर का निर्माण, और इंटरफ़ेस प्रवर्तन के लिए एब्सट्रैक्ट बेस क्लासेस का उपयोग शामिल है। यह कॉन्टेक्स्ट मैनेजर्स के माध्यम से संसाधन प्रबंधन और टेक्स्ट व बाइट अनुक्रमों के प्रबंधन को भी प्रदर्शित करता है।
Code demonstrating custom attribute access, descriptor protocols, and special method overrides for Python objects.
CPython-Internals, CPython इंटरप्रेटर के लिए एक तकनीकी कार्यान्वयन गाइड और रेफरेंस है। यह आंतरिक C सोर्स कोड और आर्किटेक्चर का विस्तृत विश्लेषण प्रदान करता है, जो इंटरप्रेटर के व्यवहार को नियंत्रित करने वाले लॉजिक पर केंद्रित है। यह प्रोजेक्ट Python ऑब्जेक्ट मॉडल और संकलन पाइपलाइन का दस्तावेजीकरण करता है, जो रॉ ग्रामर और एब्सट्रैक्ट सिंटैक्स ट्री से निष्पादन योग्य बाइटकोड तक की प्रक्रिया को ट्रैक करता है। यह C एक्सटेंशन डेवलपमेंट के लिए एक रेफरेंस के रूप में भी कार्य करता है, जो यह बताता है कि आंतरिक डेटा संरचनाओं के साथ इंटरफेस कैसे करें और C API का उपयोग कैसे करें। सामग्री में मेमोरी मैनेजमेंट शामिल है, जिसमें रेफरेंस काउंटिंग और जेनरेशनल गार्बेज कलेक्शन, साथ ही ग्लोबल इंटरप्रेटर लॉक का कार्य शामिल है।
Examines the low-level C implementation of the Python object model and internal data structures.
python-miio is a Python library and hardware driver implementation of the Miio protocol, designed for controlling and managing Xiaomi smart appliances. It provides the necessary software interfaces to translate high-level commands into network packets for device communication. The project includes a specialized network device simulator for emulating hardware responses to test protocol implementations without physical devices. It also features a command-line interface for sending commands, querying device status, and performing token retrieval for secure authentication. Capability areas cover
Uses Python descriptors to define sensor schemas and settings for automatic interface generation.