4 个仓库
Methods for intercepting and customizing attribute access, assignment, and deletion.
Distinct from Attribute Binding: Distinct from Attribute Binding: focuses on the lifecycle interception of object attributes rather than reactive data binding.
Explore 4 awesome GitHub repositories matching web development · Attribute Lifecycle Hooks. Refine with filters or upvote what's useful.
Python is a high-level, interpreted programming language designed for readability and versatility. It operates via a bytecode-based virtual machine and manages memory automatically through reference-counting garbage collection. The language supports multiple programming paradigms, including object-oriented, imperative, and functional styles, and provides a comprehensive standard library for system operations, networking, and data handling. The language is distinguished by its dynamic nature, allowing for runtime object introspection and metaclass-driven class creation. It utilizes protocol-ba
Provides protocol-based methods to intercept and customize object attribute access and modification logic.
pysheeet 是一个技术参考库,提供了一系列精选的代码片段和实现模式,用于高级 Python 开发、系统集成和高性能计算。它充当实现底层网络编程、原生 C 扩展以及异步和并发编程的综合指南。 该项目为大语言模型的开发和部署提供了专门的框架,包括用于分布式 GPU 推理和高性能服务的工具。它还包括用于高性能计算集群编排的详细模式,涵盖 GPU 资源分配和多节点工作负载管理。 该库涵盖了广泛的功能,包括安全网络通信和加密、对象关系映射和数据库管理,以及复杂数据结构和算法的实现。它还提供用于内存管理、通过外部函数接口(FFI)进行原生互操作以及系统级 OS 集成的实用程序。
Implements getters, setters, and descriptors for custom logic during attribute access.
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
Runs custom callbacks on attribute assignment for validation, conversion, or freezing.
core-decorators 是一个 JavaScript 类装饰器库和框架实用程序,用于扩展类功能。它提供了一系列工具,用于实现类行为混入 (mixins)、自动绑定方法以避免手动构造函数配置,以及验证子类方法是否正确覆盖父类方法。 该库包括一个代码弃用工具包,用于通过控制台警告标记过时的方法,以及一个用于测量性能和持续时间的函数执行分析器。它进一步通过自定义装饰器和共享逻辑注入系统,实现了对类和方法行为的修改。 其他功能涵盖对象属性控制,包括强制执行只读属性和限制属性可见性。该工具包还提供性能原语,例如结果缓存和延迟属性初始化,以将执行推迟到首次访问时。
Combines new property descriptors with superclass descriptors to prevent overwriting getters or setters.