27 مستودعات
Language patterns for wrapping functions to dynamically extend their behavior.
Distinct from Higher-Order Function Wrapping: Specializes general higher-order function wrapping into the specific Python decorator syntax (@decorator).
Explore 27 awesome GitHub repositories matching software engineering & architecture · Function Decorators. Refine with filters or upvote what's useful.
This project is an educational resource designed for learning the Python programming language. It serves as a tutorial repository and programming guide, providing a collection of annotated scripts, code examples, and cheatsheets to help users master syntax and core fundamentals. The resource focuses on moving from basic language syntax to advanced implementation, with a particular emphasis on object-oriented programming, the use of the Python standard library, and scripting automation for business workflows. The content covers a broad range of programming capabilities, including control flow
Provides annotated scripts showing how to wrap functions to add functionality without altering original source code.
This is a comprehensive tutorial for learning TypeScript, designed for JavaScript programmers who want to understand the language's type system and modern features. The resource covers TypeScript's core identity, including its structural type compatibility, compile-time type erasure, declaration file merging, and the discriminated union pattern for precise type narrowing. The tutorial distinguishes itself by providing a progressive learning path from basic JavaScript concepts to advanced TypeScript patterns. It covers generic type parameter constraints, tuple types with fixed-length positions
Teaches wrapping methods with decorators to add orthogonal behavior like logging or timing.
Resilience4j is a fault tolerance library for Java 8 applications designed to handle failures in distributed systems. It provides a comprehensive suite of resilience patterns including resource isolation, request throttling, retries, and timeouts. The project implements specific stability mechanisms such as circuit breakers to prevent cascading failures, bulkheads for system resource isolation, and rate limiters to cap execution rates. It also includes a retry framework with backoff policies and timeout enforcement to manage transient faults and maximum execution durations. Additional capabi
Implements function decorators using Java 8 functional interfaces to intercept and manage execution flow.
LearnPython is a programming tutorial consisting of a collection of practical code examples used to demonstrate Python language features and programming patterns. It serves as a comprehensive learning resource that implements core language concepts through functional code. The project provides specialized guides and samples covering several key domains. These include asynchronous network programming with event loops and coroutines, data visualization using numerical datasets for 2D and 3D plots, and web scraping for fetching content and automating login flows. It also features instructions on
Provides examples of using function decorators to dynamically extend behavior like logging and type checking.
Tenacity is a Python retry library and fault tolerance framework designed to automatically re-execute failing functions based on custom conditions, wait intervals, and stop criteria. It provides a mechanism to apply retry logic to both synchronous functions and asynchronous coroutines. The library implements exponential backoff to increase delays between retries, helping to manage transient network failures and prevent the overloading of services. Its capabilities cover the definition of retry conditions based on exception types or return values, as well as the enforcement of duration limits
Implements retry logic using Python decorators to wrap target functions and manage execution loops.
pysheeet هي مكتبة مرجعية تقنية توفر مجموعة مختارة من مقتطفات التعليمات البرمجية وأنماط التنفيذ لتطوير Python المتقدم، وتكامل النظام، والحوسبة عالية الأداء. تعمل كدليل شامل لتنفيذ برمجة الشبكات منخفضة المستوى، وإضافات C الأصلية، والبرمجة غير المتزامنة والمتزامنة. يوفر المشروع أطر عمل متخصصة لتطوير ونشر نماذج اللغات الكبيرة، بما في ذلك أدوات لاستنتاج GPU الموزع والخدمة عالية الأداء. يتضمن أيضاً أنماطاً مفصلة لتنظيم مجموعات الحوسبة عالية الأداء، وتغطية تخصيص موارد GPU وإدارة عبء العمل متعدد العقد. تغطي المكتبة سطحاً واسعاً من القدرات، بما في ذلك اتصالات الشبكة الآمنة والتشفير، والتعيين الكائني-العلائقي وإدارة قواعد البيانات، وتنفيذ هياكل البيانات والخوارزميات المعقدة. كما توفر أدوات لإدارة الذاكرة، وقابلية التشغيل البيني الأصلية عبر واجهات الوظائف الخارجية، وتكامل نظام التشغيل على مستوى النظام.
Provides patterns for creating function decorators and closures to modify behavior or implement single dispatch.
This project is a comprehensive library of practical Python code examples and patterns. It provides a collection of scripts and snippets designed to demonstrate a wide range of programming tasks, from basic syntax to advanced implementation patterns. The repository focuses on several core domains, including the implementation of concurrency and multithreading examples, data analysis snippets for cleaning and manipulating tabular data, and various data visualization examples. It also covers automation scripts for file system management and a variety of general programming patterns. Additional
Implements function decorators to inject cross-cutting concerns like execution timing and logging.
Cash هو تنفيذ JavaScript لأدوات Unix shell وواجهات سطر الأوامر. يوفر مجموعة من أدوات معالجة النصوص ومعالجة الملفات القياسية على مستوى النظام المكتوبة بـ ES6 والتي تعمل بدون تجميع أصلي أو تبعيات خارجية. يسمح المشروع بالتنفيذ البرمجي لعمليات shell باستخدام استدعاءات الدوال والقوالب الموسومة. ينفذ نظاماً لربط أوامر متعددة معاً لتصفية وتحويل البيانات من خلال خطوط أنابيب برمجية، محاكياً سلوك أنابيب shell القياسي. تتيح هذه القدرات تنفيذ أوامر نمط Unix لمعالجة الملفات والنصوص مباشرة داخل بيئة JavaScript. يتضمن التنفيذ تجريداً لنظام الملفات عبر المنصات وسجلاً لمتغيرات البيئة لضمان سلوك متسق عبر أنظمة تشغيل مختلفة.
Maps shell command names to specific JavaScript functions to simulate standard Unix utility behavior.
Pyre is a high-performance static type checker and analysis tool for Python. It identifies type errors and ensures type safety without executing the program, utilizing a static type inference engine to maintain consistency across functions. The project is distinguished by an incremental type analysis engine that operates as a background daemon. This system monitors filesystem changes to re-validate only modified parts of a project, reducing the time required for repeated analysis. It also includes a static analysis security tool that uses taint analysis to track untrusted data flows and ident
Ensures decorators preserve original function requirements while transforming the return type during static analysis.
Boltons is a comprehensive utility toolkit and extension of the Python standard library. It provides a collection of reusable recipes and specialized data structures, system utilities, and helper libraries designed to support common programming tasks across various domains. The project is distinguished by a standard-library-only dependency model, ensuring maximum portability with zero external dependencies. It provides advanced implementations for data structures, such as immutable mappings and priority queues, alongside recursive data transformation tools for reshaping complex nested diction
Provides a function decorator that ensures a function is executed only once regardless of call frequency.
Applies custom constraint functions during evolution to ensure generated individuals satisfy domain-specific rules or bounds.
an ambient intelligence library
Provides decorators that define AI agents by wrapping Python functions as callable tools with shared context.
Ell is a Python library that treats prompts as callable functions, transforming a Python function into a language model program where the docstring defines the system message and the return value defines the user message. It provides a framework for writing language model programs that can accept and return images, audio, and text natively within message objects, and supports chaining multiple model calls into a single function for multi-step reasoning or test-time compute. The library decouples model selection from client instantiation through a registry that supports multiple provider backe
Transforms a Python function into a language model program using its docstring and return value to define system and user messages.
handcalcs هو مولد وثائق رياضية ومُصيّر حسابات Python LaTeX. يعمل كأداة ورقة حساب مؤتمتة تحول كود Python والحسابات الرقمية إلى وثائق رياضية منسقة بـ LaTeX، ويعمل كمُنسق رياضيات رمزي وامتداد رياضيات لدفتر Jupyter. يحول المشروع أسماء متغيرات Python إلى رموز يونانية، ورموز سفلية، وتدوين رياضي قياسي. ويحول الكود إلى تعبيرات رياضية منسقة تعرض الصيغة الأصلية، والتعويض الرقمي، والنتيجة النهائية، مما يسمح بإنشاء أوراق حساب ذات معلمات وتقارير قابلة للقراءة البشرية. تغطي الأداة مجموعة واسعة من إمكانات العرض، بما في ذلك الرموز السفلية للمتغيرات التلقائية، وتكامل التعليقات المضمنة، وتخطيطات المعلمات متعددة الأعمدة. وتدعم إنشاء كود LaTeX خام، وعرض مستندات PDF، والتكامل مع مكتبات الرياضيات الرمزية للتعامل مع التعبيرات الجبرية. يتكامل النظام مباشرة في بيئات دفتر Jupyter باستخدام سحر الخلية لعرض المعادلات المنسقة في الوقت الفعلي.
Wraps functions with decorators to capture internal calculations for formatting.
Ships a return value decorator that passes a function's output as input to another function.
Inngest is a durable execution framework and event-driven automation engine designed to orchestrate background workflows. It enables developers to build resilient, stateful processes by memoizing function steps, ensuring that long-running tasks can automatically resume from the last successful operation after failures, timeouts, or infrastructure restarts. The platform distinguishes itself through its event-driven architecture, which uses a schema-validated bus to trigger functions and coordinate complex, multi-step logic. It employs an onion-model middleware approach for cross-cutting concer
Enforces infrastructure-specific execution limits such as payload size and timeouts.
picocli هو إطار عمل لتطوير واجهة سطر الأوامر ومحلل وسائط (argument parser) للتطبيقات القائمة على JVM. يقوم بربط خيارات سطر الأوامر والمعلمات الموضعية بأساليب وحقول Java ذات أنواع قوية باستخدام نموذج تعريفي يعتمد على التعليقات التوضيحية (annotations). يوفر إطار العمل دعماً محدداً لتجميع الصور الأصلية (native image compilation)، مما ينتج ملفات تهيئة الانعكاس والموارد اللازمة لبناء ثنائيات مستقلة مع تقليل حمل بدء التشغيل. كما يتميز بنظام مخصص لتوليد نصوص الإكمال التلقائي للصدفة (shell autocompletion) ومصمم محطة ANSI لتطبيق الألوان والأنماط على المخرجات. يغطي المشروع مجموعة واسعة من قدرات تطبيقات المحطة الطرفية، بما في ذلك إرسال الأوامر الهرمي للأوامر الفرعية المتداخلة، والتوليد المؤتمت لتعليمات الاستخدام وصفحات الدليل (man pages)، وتنفيذ الصدفة التفاعلية مع مطالبات المستخدم. كما يتضمن بنية تحتية لحقن التبعية من خلال مصانع مخصصة، وتحويل النوع القائم على الإضافات، ومعالجة ملفات الوسائط الخارجية.
Maps command line arguments and options directly to specific methods and fields for automated execution.
FastStream is an asynchronous Python framework designed for building event-driven microservices. It provides a unified abstraction layer for interacting with various message brokers, enabling developers to manage event production and consumption through a consistent interface while maintaining access to native provider-specific features. The framework centers on a decorator-based routing model that binds application logic directly to broker topics, supported by a built-in dependency injection container that resolves resources at runtime. The framework distinguishes itself through its deep int
Links input and output operations via decorators to automatically produce responses to downstream topics.
This is a full-stack template for building decentralized applications on the GenLayer blockchain, combining smart contract development with a frontend integration pipeline. It provides a pre-configured environment for writing GenLayer smart contracts using Python decorators that specify function visibility, persistence, and typed storage structures, along with built-in linting to catch forbidden imports and nondeterministic calls before deployment. The boilerplate distinguishes itself by supporting nondeterministic smart contract operations—such as querying language models and fetching extern
Defines contract logic with Python decorators for visibility, persistence, and typed storage.
This project is a diagnostic utility for monitoring and analyzing memory consumption in Python applications. It provides tools for tracking resource usage at the process level and performing detailed, line-by-line analysis to identify memory leaks and performance bottlenecks. The tool distinguishes itself through its ability to aggregate memory metrics across entire process trees, capturing the total resource impact of both parent and child processes. It supports time-series visualization of memory usage over the duration of a script, allowing for the identification of long-term consumption p
Wraps Python functions using the decorator syntax to intercept calls and trigger memory measurement routines.