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 المتقدمة والتعابير. يوفر تنفيذات كود لإتقان مفاهيم مثل التزامن، والبرمجة الفوقية (Metaprogramming)، وتصميم بنية البيانات. يتضمن المستودع أمثلة على نموذج كائن Python، تغطي الوصول المخصص للسمات، وبروتوكولات الواصف (Descriptor protocols)، وتجاوزات الطرق الخاصة. كما يتميز بتنفيذات لأنماط التصميم التي تستخدم وظائف الدرجة الأولى والمزخرفات (Decorators) لتقليل الكود المكتوب للكائنات. يغطي الكود البرمجي مجموعة واسعة من القدرات، بما في ذلك البرمجة غير المتزامنة مع حلقات الأحداث والعقود الآجلة، وإنشاء تسلسلات ومولدات مخصصة، واستخدام الفئات الأساسية المجردة لفرض الواجهة. كما يوضح إدارة الموارد من خلال مديري السياق والتعامل مع تسلسلات النصوص والبايت.
Code demonstrating custom attribute access, descriptor protocols, and special method overrides for Python objects.
CPython-Internals هو دليل تنفيذ تقني ومرجع لمفسر CPython. يوفر تحليلاً مفصلاً لكود مصدر C الداخلي والبنية، مع التركيز على المنطق الذي يحكم سلوك المفسر. يوثق المشروع نموذج كائن Python وخط أنابيب التجميع، متتبعاً العملية من القواعد النحوية الخام وأشجار بناء الجملة المجردة إلى bytecode القابل للتنفيذ. كما يعمل كمرجع لتطوير إضافات C، موضحاً كيفية التفاعل مع هياكل البيانات الداخلية واستخدام واجهة برمجة تطبيقات C. تغطي المادة إدارة الذاكرة، بما في ذلك عد المراجع وجمع القمامة الجيلي، بالإضافة إلى وظيفة قفل المفسر العام (GIL).
Examines the low-level C implementation of the Python object model and internal data structures.
python-miio هي مكتبة Python وتنفيذ برنامج تشغيل الأجهزة لبروتوكول Miio، مصممة للتحكم وإدارة أجهزة Xiaomi الذكية. توفر واجهات البرامج اللازمة لترجمة الأوامر عالية المستوى إلى حزم شبكة لاتصال الجهاز. يتضمن المشروع محاكي أجهزة شبكة متخصصاً لمحاكاة استجابات الأجهزة لاختبار تنفيذات البروتوكول بدون أجهزة مادية. كما يتميز بواجهة سطر أوامر لإرسال الأوامر، والاستعلام عن حالة الجهاز، وإجراء استرجاع الرموز للمصادقة الآمنة. تغطي مجالات القدرة اكتشاف شبكة IoT لتحديد طرازات الأجهزة وعناوين IP، بالإضافة إلى تحليل البروتوكول من خلال تحليل التقاط حزم الشبكة. تدعم المكتبة استبطان ميزات الجهاز لاسترداد البيانات الوصفية المتعلقة بالمستشعرات المتاحة والإعدادات القابلة للتهيئة.
Uses Python descriptors to define sensor schemas and settings for automatic interface generation.