thehardwarestore.ai

where AI agents shop for the right tools

── 98857 repos indexed ── | filtered by tag: python
HypothesisWorks/hypothesis ★ 9084 688 APPLICATION

Hypothesis is a mature property-based testing library for Python. The core runtime, exposed via @given in hypothesis/src/hypothesis/__init__.py, executes each decorated test many times with inputs drawn from composable SearchStrategy objects (integers, floats, text, regex, collections, datetimes, plus extras generating numpy arrays, pandas DataFrame/Series, Django models/forms, lark grammars, and more). All randomness flows through a formal choice IR (hypothesis/internal/conjecture/choice.py) into a pluggable PrimitiveProvider; the default conjecture engine (engine.py) maintains a DataTree of previously seen choice prefixes to avoid redundant exploration and detect flaky tests, and when a failure is found a cascade of shrinking passes (shrinker.py plus the shrinking/ package) reduces it to a minimal counterexample. An example database layer (in-memory, directory-based, and GitHub-artifact backends) persists and replays failures across runs, and an observability subsystem emits structured JSONL metadata per test case. The package also ships application surfaces beyond the library API: a pytest plugin (statistics, health checks, capture, deadline reporting), a CLI (a ghostwriter that auto-generates property tests from signatures/docstrings, plus codemods and failure-patching commands), and a stateful-testing framework (RuleBasedStateMachine, Bundle, @rule/@invariant). A PyO3 Rust extension (hypothesis/rust) accelerates float encoding, and the provider abstraction is validated by an embedded conformance test suite so third-party backends (e.g., CrossHair symbolic execution) can drive generation. Internal subsystems are unusually well-factored — filter predicates are rewritten into tighter strategy constraints via AST analysis, lambda sources are recovered from bytecode, and Unicode character ranges are modelled as interval sets — making several modules reusable outside the project. This is a developer-tool library with CLI and pytest entry points, not a runtime service; the repo also includes its own build/release tooling, a Pelican website, docs, and a very large self-testing suite with enforced 100% branch coverage.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 5 reusable components found
spesmilo/electrum ★ 8611 3485 APPLICATION

Electrum is a mature, production-grade Bitcoin wallet with full Lightning Network support, used by thousands of users daily. It is a desktop/mobile application with a daemon architecture, offering three GUI frontends: a full-featured PyQt6 desktop interface, a Qt Quick (QML) mobile interface, and a curses terminal interface. The daemon manages wallet lifecycle, network connections, and exposes a JSON-RPC API. The codebase is highly modular, with a plugin system for hardware wallets (Trezor, Ledger, Coldcard, KeepKey, Jade, BitBox02, Safe-T, Digital Bitbox), label sync, two-factor authentication, submarine swaps, watchtowers, and more. Core features include SPV (Simple Payment Verification) with merkle proof validation, coin selection with privacy-aware heuristics (CoinChooserPrivacy), BIP32 key derivation, mnemonic seeds (BIP39, SLIP39, legacy), and a full Lightning Network implementation with pathfinding (LNPathFinder using Dijkstra with liquidity hints), channel management, HTLC accounting, trampoline routing, and onion messages. The repository also includes deterministic build scripts for Linux (AppImage), Windows (Wine+PyInstaller), macOS, and Android (python-for-android), with reproducible builds using pinned dependencies and hash verification.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
ijl/orjson ★ 8256 339 APPLICATION

orjson is a high-performance JSON serialization and deserialization library for CPython, implemented as a Rust extension using PyO3 with direct Python C-API FFI. The public API is small and deliberate: dumps(), loads(), Fragment, JSONDecodeError, JSONEncodeError, and a set of option flags. Production behavior is derived from the Rust core, where deserialization relies on a vendored yyjson backend with an associative cache for object keys, and serialization uses a custom writer stack with SIMD-accelerated UTF-8 validation and string escaping, specialized numpy array and datetime handling, and fast paths for dataclasses, enums, UUIDs, and non-string keys. Despite the large data/ directory, this is not a data research project; the JSON fixtures and XZ-compressed corpora exist to enforce conformance and benchmark realism. The architecture is a classic C-extension pattern: src/lib.rs registers module functions, src/serialize and src/deserialize contain the main dispatch logic, and src/ffi provides tightly scoped wrappers around CPython object internals. The code demonstrates exceptional craftsmanship in performance-sensitive areas: feature-gated SIMD paths, zero-allocation stack buffers, pluggable formatter traits, memory allocator integration with CPython, and carefully managed recursion limits. The test suite is unusually strong, covering JSONTestSuite, roundtrip fidelity, Unicode edge cases, memory leaks, free-threading, and integration through WSGI and threaded workloads. The main risks are the heavy use of unsafe FFI and nightly Rust features, plus reliance on a vendored yyjson snapshot, but the project is actively maintained and tracks current CPython releases.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 5 reusable components found
hynek/structlog ★ 4939 294 APPLICATION

structlog is a production-ready structured logging library for Python. It provides a composable processor pipeline that transforms event dictionaries (key-value pairs) through filtering, enrichment, and rendering stages, ultimately producing outputs like JSON, console color, logfmt, or key-value format. The library integrates deeply with Python's standard logging module, Twisted, and asyncio, offering context management via contextvars, thread-local storage (deprecated), and a rich set of processors for timestamps, call-site parameters, exception formatting, and traceback extraction. Its architecture centers on immutability, pure functions, and lazy proxy caching, making it both flexible and performant. The codebase exhibits exceptional craftsmanship: extensive type annotations, 100% test coverage, clear documentation, and a well-defined backward-compatibility policy. It is not a data science or research project; it is a software library for application instrumentation.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 1 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
browser-use/browser-use ★ 116962 12905 APPLICATION

browser-use is a comprehensive Python framework that enables AI agents to automate web browser interactions. It provides a unified interface for controlling browsers through Playwright/CDP, integrates with multiple LLM providers for decision-making, and includes sophisticated features like structured data extraction, security controls, token usage tracking, and sandboxed execution. The architecture is modular with clear separation between agent reasoning, browser management, tool execution, and extensibility mechanisms. Key innovations include a flexible action registry system with special parameter injection, domain-aware security watchdogs, automatic LLM cost tracking, and MCP integration for extending agent capabilities. The project demonstrates strong engineering practices with extensive testing, CI/CD pipelines, and comprehensive documentation through examples.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 5 reusable components found
pathwaycom/pathway ★ 62189 1683 APPLICATION

Pathway is a high-performance live data processing framework built on top of timely dataflow and differential dataflow, providing a Python API for defining streaming and batch data pipelines. It is designed for real-time ETL, event processing, AI/ML pipelines (including RAG), and incremental computation with strong consistency guarantees. The architecture consists of a Rust core engine that handles dataflow execution, scheduling, persistence, and connectors, while the Python layer provides a declarative API for table operations, UDFs, and integrations with external systems like Kafka, databases, vector stores, and cloud storage. Key entry points include the `pathway` CLI, the Python `pw` module, and the Rust engine library. Data flows through connectors (sources/sinks), transformation operators (joins, groupby, windowing, etc.), and optional persistence for fault tolerance. External dependencies include Kafka, S3, PostgreSQL, various vector databases, and LLM services.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 4 reusable components found
Textualize/textual ★ 37401 1349 APPLICATION

Textual is a Python terminal user interface (TUI) framework that enables building interactive, visually rich applications inside the terminal. It provides a declarative CSS-based styling system (TCSS), a reactive state management model, a diverse widget library (buttons, data tables, text editors, trees, tabs, etc.), and an asynchronous event-driven architecture. The framework handles all terminal I/O across Linux, macOS, and Windows, and can also serve applications over the web via a binary protocol. Internally, it uses the `rich` library for rendering and an efficient compositor that batches updates for performance. The primary entry point is the `App` class in `src/textual/app.py`, from which users subclass and compose widgets via `compose()` methods. Styling can be embedded as `DEFAULT_CSS` or loaded from external `.tcss` files. The framework includes a `Pilot` for automated testing and a command palette for in-app search and actions. Its architecture follows a DOM tree model with message bubbling, layout engines (grid, horizontal, vertical, dock), and animation support. External dependencies include `rich` (required) and optional `tree-sitter` for syntax highlighting in the `TextArea` widget. The codebase is organized into modular internals (`_animator`, `_spatial_map`, `_wrap`, etc.) that demonstrate high craftsmanship and are often reusable in other projects.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 6 reusable components found
kovidgoyal/kitty ★ 35142 1537 APPLICATION

This repository contains kitty, a GPU-accelerated terminal emulator for Linux and macOS. It features a highly optimized C core for rendering, font shaping, and terminal emulation, with a Python configuration layer and a plugin system ("kittens") for features like file transfer, SSH integration, diff viewing, and hints. The codebase also includes a set of well-crafted Go libraries for CLI framework building, TUI event loops, fuzzy matching (Smith-Waterman variant), rsync delta patching, streaming base64, and color space conversions. These libraries are structurally independent and could be extracted into separate projects. The architecture is a monolith at the C/Python level with loosely coupled Go-based kittens that communicate via IPC. Build and packaging are handled by a custom system (bypy) and standard Python setup. The project is actively maintained with extensive CI, automated testing, and a responsive issue tracker.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 5 reusable components found
openai/openai-agents-python ★ 29825 4841 APPLICATION

The OpenAI Agents SDK (Python) is a production-grade library for building agentic AI applications. It provides a complete agent runtime (`Runner`, `Agent`, `RunConfig`) with support for tool calling, handoffs, guardrails, sandboxed execution (Docker, Modal, E2B, Cloudflare, Vercel, Unix-local), realtime voice/audio pipelines, MCP integration, and multi-provider model routing (OpenAI, LiteLLM, AnyLLM, custom). The codebase is async-first with extensive tracing/observability, session persistence (SQLite, OpenAI Conversations, Responses Compaction), and a rich lifecycle-hook system. It includes a large test suite covering unit, integration, and sandbox security scenarios, plus internal tooling skills for release management and code review. The SDK is actively maintained with a 0.23.x version, release automation via release-please, and comprehensive docs in English and Japanese.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 8 reusable components found
patroni/patroni ★ 8787 1031 APPLICATION

Patroni is a production-grade PostgreSQL high-availability orchestration daemon. Each PostgreSQL node runs a Patroni agent that performs leader election and cluster coordination through a pluggable distributed configuration store (etcd v2/v3, ZooKeeper, Consul, Kubernetes, or an embedded Raft implementation). The agent manages the full PostgreSQL lifecycle: bootstrap, start/stop, health monitoring, replica promotion, failover, switchover, pg_rewind recovery, synchronous replication quorum handling, and replication slot management. It exposes a REST API for health checks and operational control, plus a Click-based CLI (patronictl) for cluster administration. The system is a multi-node control-plane/agent architecture, not a library or data pipeline, and it is heavily exercised by unit tests, behave integration features, and a Jepsen fault-injection harness.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 4 reusable components found
librosa/librosa ★ 8683 1087 APPLICATION

librosa is a Python library for audio and music signal processing, providing a comprehensive set of algorithms for music information retrieval (MIR). It includes functions for loading audio in various formats, computing time-frequency representations (STFT, CQT, VQT, mel spectrogram), extracting features (chroma, MFCC, spectral descriptors, tempogram, rhythm features), pitch tracking (YIN, pYIN), beat and onset detection, source separation (HPSS, NMF), sequence alignment (DTW, Viterbi), and audio effects (time stretch, pitch shift, pre-emphasis). The library also offers a rich visualization module for plotting waveforms, spectrograms, and other audio representations. The architecture is modular, organized into subpackages: `librosa.core` for core DSP and I/O, `librosa.feature` for feature extraction, `librosa.util` for utility functions (array manipulation, matching, caching), `librosa.filters` for filter bank construction, `librosa.display` for visualization, and domain-specific modules like `librosa.beat`, `librosa.onset`, `librosa.decompose`, `librosa.effects`, `librosa.segment`, and `librosa.sequence`. Submodules are lazily loaded to reduce import time. The library is designed for both interactive use (notebooks) and integration into larger applications. Key entry points include `librosa.load` for audio I/O, `librosa.stft`/`librosa.cqt` for time-frequency transforms, `librosa.feature.*` for feature extraction, `librosa.beat.beat_track` for beat tracking, `librosa.onset.onset_detect` for onset detection, `librosa.display.specshow`/`librosa.display.waveshow` for visualization, and `librosa.effects.*` for audio effects. Data flows typically involve loading audio, optionally resampling, computing a spectrogram, extracting features, and then analyzing or visualizing the results. External dependencies include numpy, scipy, numba (for JIT acceleration), matplotlib (for display), soundfile/soxr/resampy (for audio I/O and resampling), pooch (for example data management), and scikit-learn (for NMF decomposition). The library is well-tested with a comprehensive test suite and continuous integration across multiple Python versions and operating systems. While primarily a software library, it includes research-oriented features such as non-Western music theory support, just intonation, and implementations of algorithms from academic publications, giving it a hybrid character.

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
keras-team/keras ★ 64348 19805 APPLICATION

Keras 3 is a multi-backend deep learning framework that provides a high-level API for building and training neural networks. It supports TensorFlow, JAX, PyTorch, NumPy, and OpenVINO backends, allowing users to switch between them with minimal code changes. The repository contains a comprehensive set of layers (convolutional, recurrent, attention, normalization, pooling, preprocessing, regularization), optimizers (Adam, SGD, AdamW, Lion, etc.), metrics, callbacks, loss functions, and utilities for model saving/loading, quantization, distillation, and distributed training. The architecture is modular with a clean separation between backend-agnostic operations and backend-specific implementations. The codebase is well-tested with extensive unit and integration tests, and includes benchmarks for performance comparison. It is actively maintained with frequent commits and responsive issue triage.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 5 reusable components found
apache/flink ★ 26398 14058 APPLICATION

Apache Flink is a distributed stream and batch processing framework that provides a unified runtime for stateful computations over unbounded and bounded data streams. The codebase reveals a master-worker architecture with a JobManager coordinating execution and TaskManagers running parallel operators. It supports both a low-level DataStream API (with event-time, watermarks, windows, and exactly-once fault tolerance via checkpointing) and a high-level Table/SQL API built on Apache Calcite for relational queries. The system is designed for high throughput, low latency, and state consistency, with pluggable state backends (RocksDB, ForSt, heap), connectors (Kafka, filesystem, etc.), and deployment targets (standalone, YARN, Kubernetes). The repository is a massive multi-module Maven project spanning core runtime, SQL planner, connectors, formats, metrics, Python bindings, and a web dashboard. Key entry points include the CLI (CliFrontend), the StreamExecutionEnvironment for programmatic job definition, and the SQL client/gateway for interactive queries. Data flows through sources (e.g., Kafka, files), transformations (map, filter, window, join), and sinks (files, databases), with checkpointing ensuring fault tolerance. External dependencies include Hadoop, Kubernetes, ZooKeeper, and various storage systems. While primarily an application framework, the repository also contains extensive benchmark queries (TPC-DS, TPC-H) and state processing APIs that blur into data research territory. However, the dominant character is a production-grade stream processing platform with a strong emphasis on software engineering practices: extensive unit/integration tests, architecture tests (ArchUnit), and a well-defined public API surface with stability annotations (@Public, @PublicEvolving, @Experimental).

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 3 reusable components found
apache/beam ★ 8684 4677 APPLICATION

Apache Beam is a unified programming model for defining both batch and streaming data-parallel processing pipelines. The codebase is the primary implementation of this model, providing SDKs in Java, Python, Go, TypeScript, and Kotlin, along with multiple runner backends (Direct, Flink, Spark, Dataflow, Jet, Twister2, Kafka Streams, Prism) and a vast ecosystem of I/O connectors for nearly every major data system (GCP, AWS, Azure, Kafka, JDBC, MongoDB, Snowflake, etc.). The repository also includes SQL extensions, ML inference transforms, cross-language execution support, a performance benchmark suite (Nexmark, TPC-DS), and extensive integration test infrastructure. Beyond the core framework, it hosts examples, learning katas, a web-based playground, and CI/CD automation for self-hosted runners. While primarily an application framework, it includes data/research elements such as benchmarking queries and synthetic data generators, but the dominant character is that of a production-grade distributed data processing library.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 3 reusable components found
unslothai/unsloth ★ 77151 7091 APPLICATION

Unsloth is a full-stack, local-first AI platform for fine-tuning and inference of large language models (LLMs), diffusion models, and audio models. It consists of two primary components: (1) the core `unsloth` Python library, which provides highly optimized LoRA/QLoRA/RL training with custom Triton kernels, and (2) the Unsloth Studio application, a Tauri desktop app with a React frontend (TanStack Router, Zustand) and a FastAPI backend (SQLite, structlog). The platform enables users to discover models from the Hugging Face Hub, download and manage them locally, run inference with chat, image/video generation, and RAG, fine-tune with a visual recipe editor, and export in multiple formats (GGUF, NVFP4). It also integrates external LLM providers (OpenAI, Anthropic, Ollama) and supports agentic tool loops via MCP and Codex transports. The codebase is extensively tested with both unit tests and source-level contract tests, and includes cross-platform desktop installers for Windows, macOS, and Linux.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 5 reusable components found
pallets/flask ★ 74796 17037 APPLICATION

Flask is a lightweight WSGI web application framework designed for building scalable web applications. It provides core functionality for routing, request handling, templating (via Jinja2), session management, and CLI commands. The framework follows a microkernel architecture with extensibility through blueprints and extensions. Key components include the Flask application class, Blueprint system for modular organization, CLI entry point for development commands, and a sans-IO core for potential async implementations. Data flows involve HTTP requests processed through WSGI middleware, routed to view functions, and rendered via templates or returned as JSON. External dependencies include Werkzeug (WSGI), Jinja2 (templating), itsdangerous (security), blinker (signals), and Click (CLI).

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 2 reusable components found
psf/requests ★ 54347 11117 APPLICATION

Requests is a widely-used Python HTTP library that provides a simple, elegant API for making HTTP/1.1 requests. It abstracts away the complexities of urllib3, offering features like session persistence, cookie handling, automatic content decoding, SSL/TLS verification, and various authentication mechanisms (Basic, Digest, OAuth via extensions). The library is designed as a set of loosely coupled modules: the public API (api.py) delegates to a Session object (sessions.py) which manages connection pooling and request defaults; the HTTPAdapter (adapters.py) bridges to urllib3; and models.py defines Request, PreparedRequest, and Response objects. The codebase is well-structured, extensively tested, and follows a feature-freeze policy, focusing on stability and compatibility rather than new features. It is not an application or data research project; it is a pure library distributed via PyPI.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 4 reusable components found
roboflow/supervision ★ 51054 4861 APPLICATION

Supervision is a model-agnostic computer vision utility library developed by Roboflow. It provides a comprehensive set of tools for post-processing detection, segmentation, and keypoint outputs from popular models (YOLO, Ultralytics, DETR, SAM, VLMs like Gemini and PaliGemma). It standardizes model outputs into `Detections` and `KeyPoints` objects, then offers annotators for visualization, tools for zone counting, tracking, line crossing, and tiled inference for large images. It also includes dataset conversion (COCO, YOLO, Pascal VOC, LabelMe, CreateML), object detection metrics (COCO mAP, F1, precision/recall), and video processing pipelines. The library is designed for production use with extensive testing, type hints, and an optional OpenCV fallback. While primarily an application library, it also contains research-oriented components such as VLM parsers and advanced mask representations (CompactMask). The codebase exhibits high craftsmanship with well-isolated components, thorough tests, and performance optimizations.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 4 reusable components found
$ loading more...
$ submit: