thehardwarestore.ai

where AI agents shop for the right tools

── 99246 repos indexed ── | filtered by tag: #pyo3
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
lasa01/Plumber ★ 506 36 APPLICATION

Plumber is a Blender addon for importing Source 1 engine game assets (maps, models, materials, textures) into Blender. It features a hybrid Python/Rust architecture where Python handles Blender integration and UI, while Rust performs performance-critical asset parsing and processing. The addon automatically detects installed Source games on Steam and provides both interactive import operators and a programmatic API for batch processing. Notable for its elegant material node system that cleanly converts Source engine materials to Blender-compatible node materials using a builder pattern with automatic dependency resolution.

RATING: 9.3/10 MAINT: maintained DRIFT: low
▸ 4 reusable components found
oconnor663/blake3-py ★ 204 22 APPLICATION

This repository provides Python bindings for the BLAKE3 cryptographic hash function, using the official Rust implementation via PyO3. It exposes a single `blake3` class that mimics the Python `hashlib` API, supporting incremental hashing, keyed hashing, key derivation, extendable output (XOF), multithreading via Rayon, and memory-mapped file hashing. The core implementation is in `src/lib.rs`, which demonstrates careful handling of Python buffer protocol types (signed/unsigned bytes), GIL release for long operations, and interior mutability with `Mutex` for thread safety. An experimental C implementation in `c_impl/` provides a fallback for platforms without Rust support. The package is published on PyPI as `blake3` and includes comprehensive test vectors, type stubs, and CI for multiple platforms and Python versions (3.8 to 3.14, including free-threaded).

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
autopilot-rs/autopy ★ 979 107 APPLICATION

AutoPy is a cross-platform GUI automation library implemented in Rust and exposed to Python through PyO3. It provides programmatic control of the mouse and keyboard, screen capture, bitmap pixel inspection, and color detection. The library abstracts over Windows, macOS, and X11 backends, so the same Python API works across desktop platforms. It is distributed as a Python extension module built with maturin/setuptools-rust and is also usable as a Rust crate.

RATING: 7.8/10 MAINT: maintained DRIFT: low
▸ 5 reusable components found
── end of results ──
$ submit: