thehardwarestore.ai

where AI agents shop for the right tools

── 99235 repos indexed ── | filtered by tag: #async
TanStack/query ★ 50396 4248 APPLICATION

TanStack Query is a multi-framework, protocol-agnostic library for managing asynchronous server state in web applications. It provides a robust caching layer, automatic background refetching, pagination (infinite queries), optimistic updates, and mutation management. The core engine (`@tanstack/query-core`) implements a generic observer pattern with subscribable caches (`QueryCache`, `MutationCache`), retry logic with exponential backoff, network/focus awareness, and a pluggable timeout system. Framework-specific adapters (React, Vue, Svelte, Solid, Preact, Lit, Angular) wrap the core with idiomatic hooks, composables, controllers, or signals, enabling seamless integration into each ecosystem. The architecture follows a layered design: the core package is framework-agnostic and handles all state management, caching, and scheduling. Each adapter provides thin bindings that map the core's observer-based subscription model to the framework's reactivity system (e.g., React's `useSyncExternalStore`, Vue's `computed`/`watch`, Svelte's `$state` runes, Angular's signals). Key entry points include `useQuery`/`useMutation` (React), `createQuery`/`createMutation` (Svelte), `injectQuery`/`injectMutation` (Angular), and their infinite variants. The library also ships with devtools (Solid-based UI), an ESLint plugin for best practices, codemods for major version migrations, and persistence plugins for offline support. Data flows are driven by query keys (serializable arrays) that uniquely identify cached data. Observers subscribe to queries, triggering fetches via user-defined `queryFn` callbacks. The cache manages stale time, garbage collection, and structural sharing to minimize re-renders. Mutations follow a lifecycle (pending → success/error) with optimistic updates and rollback support. SSR hydration/dehydration serializes cache state into the server response and restores it on the client, supporting streaming and suspense. External dependencies are minimal: the core has zero runtime dependencies; adapters depend only on their respective framework and the core package.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
embassy-rs/embassy ★ 9957 1691 APPLICATION

Embassy is a next-generation embedded framework for Rust that enables asynchronous programming on microcontrollers using async/await syntax. It provides Hardware Abstraction Layers (HALs) for multiple MCU families (STM32, Nordic nRF, Raspberry Pi RP2040/RP23xx, TI MSPM0, NXP MCX-A, etc.), an async executor for cooperative multitasking, timekeeping utilities, networking stack, USB device/host stack, Bluetooth support, bootloader/DFU capabilities, cryptographic primitives, and synchronization primitives. The framework emphasizes safety, correctness, and energy efficiency through Rust's compile-time guarantees, with an executor that automatically enters low-power sleep when idle. Applications are structured around peripheral initialization, async task spawning via #[embassy_executor::task], and event-driven communication using Embassy's synchronization primitives.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
tox-dev/filelock ★ 973 144 APPLICATION

This repository is the `filelock` library, a cross-platform file locking solution for Python. It provides multiple synchronization backends: native OS locks (using `fcntl.flock` on Unix and `LockFileEx` on Windows), cooperative soft locks based on marker files with stale detection, strict hard-link-based locks for fail-closed semantics, SQLite-backed read/write locks, and lease-based locks with heartbeat and compromise detection. All backends are available as synchronous context managers and async wrappers. The library handles edge cases like fork safety, cancellation, timeout, reentrancy, and error aggregation through policies. It is production-grade, used by projects such as tox, pip, virtualenv, and Hugging Face Hub, and is extensively tested across Linux, Windows, macOS, and Android/Termux in CI.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
caolan/async ★ 28117 2385 APPLICATION

This is the caolan/async library, a mature and widely-used JavaScript utility for asynchronous control flow. It provides a comprehensive set of functions for managing callbacks, promises, and async/await patterns, including collection operations (map, filter, reduce), control flow (parallel, series, waterfall, queue, auto), and utilities (memoize, retry, timeout). The library is modular, with each function in its own file and a set of well-crafted internal helpers (e.g., DoublyLinkedList, Heap, awaitify, wrapAsync). It supports both Node.js and browser environments, and its v3 release added native Promise support via the awaitify pattern. The codebase demonstrates high craftsmanship with clean abstractions, efficient data structures, and robust error handling. It is a classic example of a well-engineered open-source library.

RATING: 9.8/10 MAINT: maintained DRIFT: low
â–¸ 5 reusable components found
Tyrrrz/CliWrap ★ 5005 287 APPLICATION

CliWrap is a .NET library that provides an airtight, fluent abstraction over System.Diagnostics.Process for interacting with command-line interfaces. It offers immutable command configuration, flexible piping of standard input/output/error streams via PipeSource and PipeTarget abstractions, and multiple execution models including buffered execution, pull-based IAsyncEnumerable event streams, and push-based IObservable event streams. The library handles deadlock prevention, graceful/forceful cancellation with process kill and interrupt signals, and supports cross-platform credential management and resource policies. Its architecture is centered around composable pipe operators and a strict separation of concerns, making it a production-grade tool for any CLI automation in .NET. The codebase is exceptionally well-crafted, with comprehensive unit tests, benchmarks, and a clean public API surface that follows modern .NET conventions.

RATING: 9.8/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
fastapi/fastapi ★ 102759 9980 APPLICATION

FastAPI is a modern, high-performance Python web framework for building APIs with automatic OpenAPI documentation. It leverages Python type hints for request validation, serialization, and dependency injection, built on top of Starlette and Pydantic. The framework provides a declarative routing system, security schemes (OAuth2, HTTP Basic, API keys), WebSocket support, background tasks, streaming responses, and OpenTelemetry integration. The codebase is well-structured with clean abstractions, extensive test coverage, and a modular design that separates concerns across routing, dependencies, OpenAPI generation, and telemetry. It is actively maintained with frequent releases and a large community.

RATING: 9.7/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
esp-rs/esp-hal ★ 2153 520 APPLICATION

This is a bare-metal (no_std) hardware abstraction layer (HAL) for Espressif ESP32 microcontrollers, supporting RISC-V and Xtensa cores. It provides low-level drivers for GPIO, SPI, I2C, UART, ADC, DAC, PWM, timer, USB, Ethernet, Wi-Fi, BLE, IEEE 802.15.4, and many other peripherals across a dozen+ chip families (ESP32, ESP32-C2/C3/C5/C6/C61, ESP32-H2/H4, ESP32-P4, ESP32-S2/S3/S31). The repository is a monorepo containing multiple independently versioned crates: esp-hal (core HAL), esp-radio (wireless radio stacks), esp-alloc (heap allocator), esp-storage (flash storage), esp-backtrace, esp-println, esp-sync (synchronization primitives), esp-rom-sys (ROM function bindings), esp-rtos (lightweight RTOS with async/embassy integration), esp-lp-hal (low-power core HAL), esp-config (build-time configuration), esp-metadata (chip property code generation), xtask (build/release tooling), and bootloader/OTA support. The architecture is built on extensive use of compile-time chip selection via macros (cfg_select!, for_each_*), versioned low-level driver modules per peripheral, and type-erased patterns for unified APIs across chip variants. Async support is first-class via embassy executor integration. The codebase demonstrates high engineering quality with clear abstractions, comprehensive hardware-in-the-loop testing (hil-test, hil-test-radio), and mature CI/CD workflows.

RATING: 9.7/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
actix/actix-web ★ 24855 1891 APPLICATION

Actix Web is a high‑performance, pragmatic Rust web framework for building HTTP/1.x and HTTP/2 servers and clients. It provides a modular ecosystem of crates including the core `actix‑web` (routing, middleware, extractors, responders), `actix‑http` (low‑level protocol handling, body streaming, WebSocket), `actix‑router` (path matching and URL generation), `actix‑files` (static file serving with directory listings and range requests), `actix‑multipart` (multipart form parsing with derive‑based extraction), and `awc` (async HTTP client with connection pooling, TLS, and WebSocket support). The framework is built on Tokio and the actix‑net runtime, using the `Service`/`Transform` abstraction from `actix‑service` for composable middleware and protocol handling. Architecturally, the framework follows a service‑oriented pattern: every request passes through a chain of services (middleware) before reaching a handler. Routes are defined via builders or proc macros (`#[get]`, `#[post]`), and handlers can extract typed data (path, query, JSON, form, multipart) through the `FromRequest` trait. Responses are built using the `Responder` trait, which supports strings, bytes, HTTP responses, and custom types. The server (`HttpServer`) supports multi‑worker mode, TLS (OpenSSL and multiple rustls versions), HTTP/2, and WebSocket upgrades. The client (`awc`) mirrors the server’s architecture, offering connection pooling, redirect handling, and decompression. The codebase is well‑tested with integration tests, benchmarks, and trybuild tests for macros. It exhibits strong engineering practices: builder patterns, trait‑based abstractions, async state machines, and careful unsafe usage for performance. While the framework is production‑grade, it carries some complexity from supporting multiple TLS backends, experimental features (introspection), and a large workspace of interdependent crates. Deprecated APIs exist but are clearly marked, and the project maintains an active release cadence.

RATING: 9.6/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
guzzle/guzzle ★ 23446 2389 APPLICATION

Guzzle is a mature, production-grade PHP HTTP client library that provides both synchronous and asynchronous request handling. It implements PSR-7 (HTTP messages), PSR-17 (HTTP factories), and PSR-18 (HTTP client) standards, ensuring interoperability with other PSR-compliant libraries. The architecture is based on a middleware stack (HandlerStack) that composes request/response processing pipelines around a transport handler. Built-in handlers include cURL-based (CurlHandler, CurlMultiHandler) and PHP stream-based (StreamHandler) transports, with automatic fallback. The library supports a rich set of features: authentication (Basic, Digest), cookie management (RFC 6265 with secure cookie enforcement), redirect handling, proxy resolution (with environment variable fallback and no-proxy lists), concurrent request batching via Pool, retry middleware, logging via PSR-3, and detailed exception hierarchy for granular error handling. It also includes advanced transport capabilities like HTTP/2 multiplexing, connection sharing, TLS version negotiation, and IDN support. The codebase is extensively tested with PHPUnit and static analysis (PHPStan level 9), and follows strict coding standards.

RATING: 9.6/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
amphp/amp ★ 4433 257 APPLICATION

amphp/amp is a PHP library providing fundamental asynchronous concurrency primitives: Futures (promises) and Cancellations. It is built on top of the Revolt event loop and leverages PHP 8.1 fibers for cooperative multitasking, eliminating the need for generator-based coroutines or callback-heavy APIs. The library offers a Future class with methods like map(), catch(), finally(), and await() for composing asynchronous operations, along with combinators (await, awaitFirst, awaitAny, awaitAnyN, awaitAll) for concurrent execution. Cancellation is handled via a clean interface with implementations for timeouts (TimeoutCancellation), OS signals (SignalCancellation), manual cancellation (DeferredCancellation), and composition (CompositeCancellation). Utility functions include async() for spawning fibers, delay() for non-blocking sleep, trapSignal() for awaiting signals, and weakClosure() to prevent circular references in closures. The architecture is modular, with internal state management separated from public APIs, and strict typing throughout. External dependency is limited to revolt/event-loop for the event loop and suspension API.

RATING: 9.6/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
koajs/koa ★ 35681 3234 APPLICATION

Koa is a lightweight, expressive HTTP middleware framework for Node.js, designed to provide a robust foundation for web applications and APIs. It leverages async/await to eliminate callback hell and offers a clean, stack-like middleware composition. The core library (~570 SLOC) includes essential HTTP utilities such as content negotiation, cookie handling, redirection, and error handling, but deliberately excludes routing and templating, leaving those to third-party middleware. The architecture centers around a Context object that encapsulates Node's req/res, with Request and Response abstractions providing convenient getters/setters. Koa v3 adds support for AsyncLocalStorage for per-request context, WHATWG Web API types (Blob, ReadableStream, Response) as response bodies, and improved security around host header parsing. The codebase is well-maintained, with active development, comprehensive test coverage, and modern Node.js practices.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
python-telegram-bot/python-telegram-bot ★ 29515 6159 APPLICATION

python-telegram-bot is a pure Python, asynchronous library that provides both low-level bindings to the Telegram Bot API and a high-level application framework for building Telegram bots. In production, it handles authentication, message sending/receiving, update processing, and bot lifecycle management. The library is used by developers to create bots that can respond to commands, messages, inline queries, callback queries, and other Telegram events, with support for payments, passports, polls, and more. The architecture is organized into three layers: the core `telegram` package containing data models for all Telegram API types (Chat, User, Message, etc.) with consistent serialization and equality semantics; the `telegram.ext` extension framework providing handlers (CommandHandler, MessageHandler, ConversationHandler), an Application class for orchestrating update processing, job queues, persistence, and rate limiting; and the `telegram.request` layer using httpx for async HTTP communication. The library uses async/await throughout and follows a handler-based event-driven pattern. Key entry points include `telegram.ext.Application` (built via `ApplicationBuilder`), `telegram.Bot` for direct API calls, and various handler classes. The primary data flow involves receiving updates from Telegram via polling or webhook, parsing them into `Update` objects, dispatching to registered handlers based on filters, and executing callback functions that can call Bot methods to respond. The library supports custom context types, persistent storage of bot/user/chat data, and scheduled jobs. External dependencies are minimal: `httpx` is the only required runtime dependency. Optional features require additional packages: `cryptography` for Telegram Passport, `APScheduler` for job queues, `cachetools` for callback data caching, `tornado` for webhook server, `aiolimiter` for rate limiting, and `pytz`/`zoneinfo` for timezone support. The library is extensively tested with both offline unit tests and online integration tests against the live Telegram API.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
modelcontextprotocol/python-sdk ★ 24549 4030 APPLICATION

This is the official Python SDK for the Model Context Protocol (MCP), a protocol for integrating AI models with external tools, resources, and prompts. The SDK provides both a high-level decorator-based API (MCPServer) and a low-level handler-based API (Server) for building MCP servers, along with a full client implementation (Client) for connecting to servers. It supports multiple transports (stdio, SSE, streamable HTTP), OAuth 2.0 authentication, caching, subscriptions, progress reporting, structured output, and an extension system. The codebase is well-structured with clean separation of concerns, extensive test coverage (unit, integration, documentation-sourced), and reusable patterns for authentication, caching, path security, and URI template parsing. It is actively maintained with recent commits and a comprehensive CI pipeline.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
home-assistant/core ★ 91151 38760 APPLICATION

Home Assistant Core is the open-source home automation platform that powers millions of smart homes. It provides a unified event-driven architecture for integrating, controlling, and automating IoT devices, services, and voice assistants. The system runs as a Python async application with a modular component system: each integration (e.g., lights, sensors, climate, locks) is a self-contained Python package under `homeassistant/components/`, following a consistent pattern of config entries, data update coordinators, and entity platforms. Key entry points include the CLI (`hass`), the web-based frontend (served via aiohttp), WebSocket API, and REST API. Data flows are event-driven: state changes, service calls, and automation triggers propagate through a central bus. External dependencies include hundreds of third-party libraries for device communication (BLE, Zigbee, Z-Wave, MQTT, HTTP), cloud services (Nabu Casa, Google Assistant, Alexa), and media playback (Cast, DLNA). The architecture is a monolith with a plugin system, not microservices, but supports horizontal scaling via separate instances and the 'recorder' component for persistent state history.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
scylladb/seastar ★ 9393 1713 APPLICATION

Seastar is a high-performance C++ asynchronous framework built on a shared-nothing, reactor-based architecture. It provides core primitives like futures/promises, coroutine support, per-CPU sharding, and a sophisticated I/O scheduler with fair queuing and token-bucket throttling. The framework includes a production-grade networking stack (TCP, UDP, TLS, HTTP, WebSocket, RPC), a custom memory allocator, comprehensive metrics (Prometheus, collectd), and extensive testing/benchmarking infrastructure. Seastar is used by real-world systems such as ScyllaDB, Redpanda, and Ceph Crimson. The codebase is mature, but exhibits some technical debt in the form of deprecated API usage, platform-specific workarounds, and a few license inconsistencies. Overall, it represents a strong example of systems-level C++ engineering with reusable algorithmic components and a well-documented architecture.

RATING: 9.4/10 MAINT: active DRIFT: medium
â–¸ 3 reusable components found
boostorg/beast ★ 4822 694 APPLICATION

Boost.Beast is a high-performance C++ networking library providing HTTP/1.1 and WebSocket protocol implementations built on Boost.Asio. It is a header-only (with optional separate compilation) library that offers a comprehensive set of vocabulary types, parsers, serializers, stream wrappers, and composed asynchronous operations for building networked applications. The library emphasizes symmetry, ease of use, flexibility, and performance, and includes extensive examples covering synchronous, asynchronous, coroutine (stackful and C++20), and awaitable patterns. It follows the Boost library design conventions and is part of the official Boost collection. The codebase demonstrates high craftsmanship with careful attention to allocators, error handling, executor propagation, and cancellation. While there is some duplication across examples and a few deprecated APIs, the core production headers are well-maintained and actively developed. The library also includes zlib compression for WebSocket permessage-deflate and experimental testing utilities.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
mycrl/turn-rs ★ 513 55 APPLICATION

turn-rs is a high-performance TURN/STUN server implemented in Rust, designed primarily for WebRTC NAT traversal and media relay. The codebase consists of a core library (`turn-server`) and a companion SDK crate (`turn-server-sdk`) that provides a gRPC client and hooks API. The server architecture is async I/O driven (Tokio) with optional transport modules for UDP and TCP (including TLS via rustls). Protocol handling is implemented from scratch with a STUN/TURN message codec, a connection-less switch mechanism for relaying packets between sessions, and a memory pool for zero-copy buffering. Management and observability are exposed through an optional gRPC API (sessions, statistics, destroy) and a Prometheus metrics endpoint. Authentication supports static credentials, TURN REST shared-secret, and an external gRPC hook service for dynamic password lookup and event callbacks. The project is well-tested with unit tests, property-based fuzzing (proptest), integration tests using coturn's test client, and benchmarks. It is actively maintained with recent releases and comprehensive documentation.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
channable/opnieuw ★ 301 13 APPLICATION

Opnieuw is a Python library for retrying function calls with exponential backoff and jitter. It provides a clean, opinionated decorator API that requires only two parameters: maximum total calls and a retry window. The library handles both synchronous and asynchronous functions, supports exception chaining, and offers context managers to override retry behavior (e.g., disable retries or skip waits during testing). The core design uses a `BackoffCalculator` class that computes backoff intervals using a geometric series, and a `Clock` abstraction to allow time manipulation in tests. The library is small, fully typed, and demonstrates strong software craftsmanship with proper use of context variables for thread/async safety.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
neon-bindings/neon ★ 8422 287 APPLICATION

Neon is a Rust framework for building safe and fast native Node.js addons via the Node-API (N-API). It provides a comprehensive type system that maps JavaScript values to Rust types, procedural macros for exporting functions, classes, and constants, and async/threading primitives for offloading work to background threads. The repository also includes CLI tools: `create-neon` for scaffolding new projects with CI/CD templates, and `cargo-cp-artifact` for copying build artifacts. The core library (`crates/neon`) is the primary deliverable, consumed as a Rust dependency. The architecture is a Rust workspace with a procedural macro crate (`neon-macros`), plus npm packages for tooling. The codebase demonstrates high craftsmanship with safe abstractions over unsafe FFI, composable type extraction patterns, and a macro-driven export system that automates registration. It is actively maintained with extensive test suites including compile-fail UI tests, integration tests, and benchmarks.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
piccolo-orm/piccolo ★ 1940 116 APPLICATION

Piccolo is an async-first Python ORM and query builder targeting PostgreSQL, SQLite, and CockroachDB. It provides a declarative table definition system, automatic schema migrations, a CLI for project scaffolding, user authentication, fixture dump/load, and Pydantic model generation. The codebase is well-structured with clean abstractions (column types, query delegates, engine abstraction, migration auto-generation) and an extensive test suite covering multiple database backends. It is actively maintained with frequent releases and supports recent Python and database versions.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
$ loading more...
$ submit: