For class method patterns, the strongest matches are python-attrs/attrs (Attrs provides class-level metaprogramming through decorators to automate boilerplate), micheles/decorator (This repository is a Python utility library focused on) and vuejs/vue-class-component (This repository is a TypeScript-based UI component decorator library). tmenier/flurl and python/cpython round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
Hand-picked class method patterns and design implementations. Compare top approaches, code examples, and alternatives to find the best fit.
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
Attrs provides class-level metaprogramming through decorators to automate boilerplate generation, aligning with your search for advanced object-oriented utility frameworks.
The project is a Python metaprogramming toolkit designed to build signature-preserving function decorators, generic dispatch functions, and context managers without losing metadata. It provides utilities for constructing custom function wrappers and converting generator functions or context managers into reusable decorators that automatically wrap execution blocks. The library supports multi-argument generic function dispatch by routing calls based on runtime argument types and virtual base classes, complete with abstract base class and virtual ancestor resolution. It also includes capabiliti
This repository is a Python utility library focused on simplifying function and method decoration, though it leans more toward function decorators than advanced class-level metaprogramming or mixin composition.
This library provides a structural pattern for building user interface components using ES6 classes and decorators. It functions as a TypeScript component library that allows developers to manage state and logic within the Vue framework by defining components as classes instead of using standard options objects. The project utilizes a TypeScript decorator to translate class properties and methods into the standard format required by the framework runtime. This approach enables a class-based component architecture that leverages TypeScript for improved type safety and code organization. The s
This repository is a TypeScript-based UI component decorator library for Vue rather than a general-purpose Python utility framework for object-oriented metaprogramming and class patterns.
Flurl is a .NET fluent URL builder and HTTP client wrapper designed for constructing complex web addresses and sending requests with a chainable interface. It functions as a URL manipulation library and an HTTP mocking framework to facilitate network interaction and testing. The project distinguishes itself through a fluent interface that allows for the incremental construction of paths, query parameters, and fragments. It provides a dedicated mocking system to intercept outgoing network traffic and return predefined responses, enabling isolated unit testing without a live server. Its broade
Flurl is a .NET URL builder and HTTP client wrapper, which is entirely unrelated to the requested Python metaprogramming and class decorator libraries.
CPython is the primary, community-maintained reference implementation of the Python programming language. It functions as a high-level, interpreted execution environment that compiles source code into platform-independent bytecode for processing by a stack-based virtual machine. The runtime manages memory through a combination of reference counting and generational cyclic garbage collection, while dynamic type dispatching determines object behavior at runtime based on metadata stored within object headers. The project is distinguished by its C-based architecture, which provides a stable forei
CPython is the reference implementation of the Python programming language itself rather than a utility library for advanced object-oriented patterns and class metaprogramming.
Error-or is a library that implements the result pattern to replace exception-based control flow with structured data. It provides a discriminated union implementation that encapsulates either a successful value or an error state within a single type, ensuring that operation outcomes are treated as first-class values. The library enables functional error handling by providing a fluent interface for chaining sequential operations. This monadic pipeline composition allows developers to define dependent operations that automatically short-circuit and return an error if any individual step in the
Error-or is a C# library for functional error handling and the result pattern, which addresses control flow rather than the Python class decorators and metaprogramming requested here.
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
This repository is a hardware driver and control library for Xiaomi smart home devices rather than a utility framework for advanced object-oriented design patterns or metaprogramming.
ffmpeg-python is a Python wrapper that translates programmatic method calls into command-line arguments for executing FFmpeg media processing tasks. It functions as a multimedia transcoding interface and a media stream capture tool, allowing for the recording of live audio and video from hardware devices and network sources. The library features a fluent interface for constructing complex directed graphs of audio and video filters through method chaining. It also includes an FFprobe metadata extractor that retrieves structured technical properties from media files and returns them as Python d
This is a media processing and fluent command generation wrapper for FFmpeg rather than a general-purpose object-oriented metaprogramming or class utility library.
Pydantic is a data validation library and parsing framework for Python. It functions as a type-based schema validator that uses standard Python type annotations to ensure input data conforms to predefined structural schemas. The project provides capabilities for parsing raw data into typed objects through automatic type conversion and validation. This includes the serialization of data and the validation of data structures to enforce correctness. The framework covers several application areas, including the verification of API requests and the management of application configurations. It all
Pydantic is a data validation and parsing library built around type annotations rather than general object-oriented metaprogramming patterns or custom class-level decorators, making it a neighbouring domain rather than the utility library you are looking for.
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
This repository is the source code of the Python programming language interpreter itself rather than a utility library for advanced object-oriented design patterns and metaprogramming.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| python-attrs/attrs | 5.8K | Python | MIT | |
| micheles/decorator | 907 | Python | BSD-2-Clause | |
| vuejs/vue-class-component | 5.8K | TypeScript | MIT | |
| tmenier/flurl | 4.4K | C# | MIT | |
| python/cpython | 73.3K | Python | NOASSERTION | |
| error-or/error-or | 2.1K | C# | MIT | |
| rytilahti/python-miio | 4.2K | Python | GPL-3.0 | |
| kkroening/ffmpeg-python | 11K | Python | Apache-2.0 | |
| samuelcolvin/pydantic | 28K | Python | MIT | |
| walter201230/python | 26.5K | Python | CC-BY-4.0 |