awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
micheles avatar

micheles/decorator

0
View on GitHub↗
907 stars·116 forks·Python·BSD-2-Clause·15 views

Decorator

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 capabilities for asynchronous coroutine decoration, class-to-decorator conversion, parameterized decorator factories, and upgrading third-party or legacy implementations to retain original function signatures, docstrings, and annotations.

Additional features encompass dynamic function generation tools for programmatically building new functions with custom names, signatures, and body templates at runtime. It also provides resource access state management wrappers that block execution or return alternative messages when target resources are unavailable.

Features

  • Function Decorators - Builds custom Python function decorators that preserve original signatures, docstrings, and metadata without complex closure patterns.
  • Asynchronous Coroutine Decorators - Decorates asynchronous coroutine functions while preserving their execution semantics and inspection compatibility.
  • Generator Context Transformers - Converts generator functions and context managers into signature-preserving decorators that wrap execution blocks.
  • Function Signatures - Retains original function signatures, docstrings, annotations, and metadata across decorated functions for accurate runtime introspection.
  • Generic - Maintains a lookup table of specialized implementations supporting inheritance hierarchies and virtual base classes.
  • Python Decorator Libraries - Provides utilities for building signature-preserving function decorators, generic dispatch functions, and context managers without losing metadata.
  • Multi-Argument Dispatchers - Routes function calls to specialized implementations based on the runtime types of multiple positional arguments.
  • Metaprogramming - Constructs and transforms functions dynamically at runtime with custom names, signatures, and annotations for advanced metaprogramming tasks.
  • Multi-Argument Generic Dispatches - Dispatches function calls to specialized implementations based on the runtime types of chosen function arguments, supporting virtual base classes.
  • Python Generic Function Dispatchers - Implements generic functions in Python that route execution based on the runtime types of one or more arguments.
  • Runtime Type Dispatching - Routes function calls to specialized implementations dynamically by evaluating the runtime types of specified positional arguments.
  • Generator-to-Context Converters - Transforms generator functions into context managers that act as signature-preserving execution decorators.
  • Context Manager Function Wrappers - Converts Python generator functions and context managers into signature-preserving decorators that automatically wrap execution blocks.
  • Reusable Function Wrappers - Defines reusable function wrappers that alter or enhance the behavior of target functions without modifying source code.
  • Signature Metadata Propagations - Copies original docstrings, annotations, and parameter specifications directly onto wrapper functions to maintain tool inspection compatibility.
  • Class-Based Decorators - Transforms class definitions into callable decorators that instantiate the class or execute logic when applied to target functions.
  • Decorator Factories - Constructs parameterized decorator factories that accept configuration arguments for flexible function modification.
  • Dynamic Function Generators - Constructs new functions programmatically at runtime with custom names, signatures, and body templates for advanced metaprogramming tasks.
  • Context Managers - Provides a metaprogramming toolkit that converts generator functions and context managers into reusable signature-preserving function decorators.

Star history

Star history chart for micheles/decoratorStar history chart for micheles/decorator

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Decorator

Similar open-source projects, ranked by how many features they share with Decorator.
  • fluentpython/example-codefluentpython avatar

    fluentpython/example-code

    5,569View on GitHub↗

    This project is a collection of practical scripts and reference guides that demonstrate advanced Python language features and idioms. It provides code implementations for mastering concepts such as concurrency, metaprogramming, and data structure design. The repository includes examples of the Python object model, covering custom attribute access, descriptor protocols, and special method overrides. It also features implementations of design patterns that utilize first-class functions and decorators to reduce object-oriented boilerplate. The codebase covers a broad range of capabilities, incl

    Python
    View on GitHub↗5,569
  • wuye9036/cpptemplatetutorialwuye9036 avatar

    wuye9036/CppTemplateTutorial

    10,572View on GitHub↗

    This project is a C++ template tutorial and metaprogramming guide. It provides instructional content on using templates to implement generic programming and execute Turing-complete logic during the compilation process. The guide serves as a reference for static type dispatching, substitution failure, and the use of concepts to ensure type safety. It covers methods for selecting function implementations at compile time to eliminate runtime branching. The material addresses compile-time type manipulation, including the transformation of type qualifiers and the use of constraints to prevent inv

    C++
    View on GitHub↗10,572
  • jayphelps/core-decoratorsjayphelps avatar

    jayphelps/core-decorators

    4,495View on GitHub↗

    core-decorators is a JavaScript class decorator library and framework utility for extending class functionality. It provides a collection of tools for implementing class behavior mixins, automating method binding to avoid manual constructor configuration, and verifying that subclass methods correctly override parent methods. The library includes a code deprecation toolkit for flagging obsolete methods with console warnings and a function execution profiler for measuring performance and duration. It further enables the modification of class and method behavior through a system of custom decora

    JavaScript
    View on GitHub↗4,495
  • apache/groovyapache avatar

    apache/groovy

    5,446View on GitHub↗

    Groovy is a JVM programming language and metaprogramming framework that provides a Java compatible environment for building applications. It functions as a dynamic scripting language and a tool for authoring domain-specific languages, allowing for the execution of custom scripts and the creation of specialized mini-languages with concise syntax. The project is distinguished by its ability to modify program behavior and class definitions through both compile-time and runtime metaprogramming. It utilizes a hybrid typing model that combines dynamic method resolution with optional static type che

    Javaapachecompilerdynamic-typing
    View on GitHub↗5,446
See all 28 alternatives to Decorator→

Frequently asked questions

What does micheles/decorator do?

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.

What are the main features of micheles/decorator?

The main features of micheles/decorator are: Function Decorators, Asynchronous Coroutine Decorators, Generator Context Transformers, Function Signatures, Generic, Python Decorator Libraries, Multi-Argument Dispatchers, Metaprogramming.

What are some open-source alternatives to micheles/decorator?

Open-source alternatives to micheles/decorator include: fluentpython/example-code — This project is a collection of practical scripts and reference guides that demonstrate advanced Python language… wuye9036/cpptemplatetutorial — This project is a C++ template tutorial and metaprogramming guide. It provides instructional content on using… jayphelps/core-decorators — core-decorators is a JavaScript class decorator library and framework utility for extending class functionality. It… kanaka/mal — This project is a Lisp interpreter implementation guide and framework designed to teach the core principles of… apache/groovy — Groovy is a JVM programming language and metaprogramming framework that provides a Java compatible environment for… dabeaz-course/python-mastery — This project is a comprehensive programming course and educational curriculum designed to transition developers from…

Curated searches featuring Decorator

Hand-picked collections where Decorator appears.
  • Class method patterns