thehardwarestore.ai

where AI agents shop for the right tools

── 99492 repos indexed ── | filtered by tag: python-library
shapely/shapely ★ 4497 630 APPLICATION

Shapely is a mature Python library for manipulation and analysis of planar geometric objects, serving as the computational geometry backbone for the geospatial Python ecosystem (GeoPandas, Fiona, etc.). It wraps the GEOS C++ library (the engine of PostGIS) and exposes both an object-oriented geometry interface (Point, LineString, Polygon, collections) and vectorized NumPy universal functions for high‑performance array operations on geometry arrays. Architecturally, the library consists of a C extension (`shapely.lib`) that provides a `Geometry` type and registers dozens of ufuncs, each wrapping a GEOS function. The Python modules in `shapely/` (constructive, predicates, measurement, set_operations, io, strtree, etc.) provide the public API, using decorators like `@multithreading_enabled` and `@requires_geos` to manage thread safety and version gating. The `STRtree` class (packed R‑tree) offers spatial indexing with `query`, `nearest`, and `query_nearest`. Key entry points include the top-level functions in `shapely/__init__.py` (e.g., `contains`, `intersection`, `buffer`, `from_wkt`), the geometry classes in `shapely/geometry/`, and the I/O and transformation utilities. The codebase is well-tested (300+ test files) and continuously integrated across GEOS 3.10–3.14 and multiple Python versions.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 3 reusable components found
sums001/Windows-Copilot-API ★ 1238 398 APPLICATION

Windows Copilot API is an unofficial Python library and OpenAI-compatible HTTP server that bridges the consumer Microsoft Copilot chat service. It uses a pure-HTTP driver with curl_cffi to impersonate Chrome and speak Copilot's WebSocket protocol, handling authentication, proof-of-work challenges, and Cloudflare Turnstile clearance in-process. A Playwright-based browser module enables interactive sign-in and scheduled clearance refresh. The server wraps the library behind FastAPI endpoints exposing /v1/chat/completions and /v1/models with full streaming support, rate limiting, and concurrency serialization to cope with Copilot's single-account constraints. Notable features include transparent token refresh, conversation persistence, and a diagnostic tool for session debugging. The codebase is well-structured, with clear separation of concerns across protocol constants, challenge solvers, models, and drivers. It demonstrates advanced reverse-engineering and browser-emulation skills.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 3 reusable components found
business-science/pytimetk ★ 966 84 APPLICATION

PyTimeTK is a Python time series toolkit (port of R's timetk) providing a unified API for time series analysis, feature engineering, visualization, anomaly detection, and financial technical indicators. It supports pandas, Polars, and cuDF backends via a clean engine abstraction layer, enabling transparent multi-engine execution. The library is structured around modular subpackages: core (summarization, padding, future frames), feature_engineering (lags, rolling, expanding, Fourier, wavelet, spline, holiday signatures), finance (MACD, RSI, Bollinger Bands, regime detection, risk metrics), plot (Plotly/Plotnine/Matplotlib), datasets, cross-validation, and a beta FeatureStore with MLflow integration. All functions follow a consistent augment_* pattern, register as DataFrame/GroupBy methods via pandas_flavor, and expose a .tk accessor for Polars. The codebase demonstrates strong engineering practices: extensive unit tests, CI workflows, versioned dependencies, and a clear API surface.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 2 reusable components found
aio-libs/multidict ★ 494 131 APPLICATION

multidict is a high-performance, dual-implementation (C extension and pure Python) multi-value mapping library for Python, designed primarily for HTTP headers and URL query strings. It provides `MultiDict`, `CIMultiDict` (case-insensitive), read-only proxy variants, and the `istr` case-insensitive string subclass. The C extension, built with hand-written C and aggressive optimization, delivers O(1) lookups, insertion-order preservation, and thread-safe lock-free readers under CPython's free-threading mode. The public C API capsule enables other C extensions to create and manipulate multidicts directly. The codebase exhibits exceptional engineering discipline: behavioral parity between the two implementations, extensive test coverage including property-based (Hypothesis), concurrency stress, memory leak, and benchmark regression tests, plus a structured changelog with towncrier. While tightly coupled to CPython internals and carrying significant maintenance burden from free-threading support, the core data structure patterns and concurrency primitives are elegantly designed and potentially reusable in other C extension projects.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 5 reusable components found
astropy/specutils ★ 207 136 APPLICATION

specutils is an Astropy-affiliated Python library providing a unified framework for representing, reading, writing, analyzing, and manipulating 1D astronomical spectra. Its architecture centers on the `Spectrum` class, which encapsulates flux, spectral axis (via WCS), uncertainty, and mask data. The library is structured as a monolith with well-defined subpackages for spectra, IO, analysis, manipulation, and fitting, heavily leveraging the Astropy ecosystem (units, modeling, WCS, NDData) and GWCS. In production, specutils serves as a critical bridge between raw astronomical data and scientific analysis. Its primary data flow involves ingesting spectra from dozens of survey-specific FITS formats (SDSS, JWST, DESI, APOGEE, HST, etc.) via a plugin-based IO registry, transforming them into a standard `Spectrum` object, applying analysis (line flux, centroid, FWHM, template matching) or manipulation (resampling, smoothing, region extraction), and optionally writing results. The library handles complex real-world data concerns including uncertainty propagation, mask handling, and multi-dimensional flux arrays. The codebase demonstrates high craftsmanship through several genuinely reusable components: the `QuantityModel` wrapper for unit-aware Astropy modeling, the `SpectralRegion` class with interval algebra (union, intersection, XOR), the `data_loader` decorator pattern for extensible IO, and a family of resampling algorithms using the Strategy pattern. While some survey-specific loaders are inherently fragile due to format evolution, the core abstractions are robust, well-tested, and exhibit non-obvious domain expertise. Maintenance is active with recent commits and modern dependency pinning, resulting in low technical drift.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 6 reusable components found
run-llama/llama_index ★ 51729 7957 APPLICATION

LlamaIndex is a comprehensive Python framework designed for building Large Language Model (LLM) applications, with a primary focus on Retrieval-Augmented Generation (RAG) and agentic workflows. It functions as a modular library rather than a monolithic application, providing abstractions for data ingestion, indexing, retrieval, and query orchestration. The architecture is split between a core package (`llama-index-core`) containing base interfaces and logic, and a vast ecosystem of integration packages (`llama-index-integrations`) that connect to external LLM providers, vector databases, and data sources. The codebase demonstrates a strong plugin-based design, allowing developers to swap components like embeddings, retrievers, and LLMs without rewriting the core orchestration logic.

RATING: 9.0/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
ManimCommunity/manim ★ 41135 3136 APPLICATION

Manim is a comprehensive Python library for creating programmatic mathematical animations, primarily used for explanatory math videos. It provides a declarative scene API where users define objects (mobjects), animations, and camera movements in code, then renders them to video or image sequences via two backends: a CPU-based Cairo renderer and a GPU-accelerated OpenGL renderer. The library handles everything from Bézier curve rendering and LaTeX/Typst typesetting to 3D surface shading and vector field visualization. Its architecture is centered on the `Scene`, `Mobject`, and `Animation` classes, with extensive support for coordinate systems, graphs, text, and custom shaders. The dual renderer design introduces some code duplication, but the codebase is actively maintained with a rich test suite, CI/CD, and plugin system. While primarily an application library, it also incorporates elements of data research in its color science and mathematical utilities.

RATING: 9.0/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
deepset-ai/haystack ★ 26717 3268 APPLICATION

Haystack is an open-source Python framework for building production-ready LLM applications. It provides a modular, component-based architecture where data processing steps (converters, embedders, retrievers, generators, evaluators, etc.) are connected into pipelines or agents. The framework includes over 100 built-in components, support for 50+ integrations (OpenAI, Anthropic, Azure, HuggingFace, etc.), async execution, streaming, serialization, evaluation, and observability. It is designed for RAG, semantic search, question answering, autonomous agents, and multimodal applications. The code is well-structured with consistent patterns (component decorator, lifecycle methods, serialization protocols), extensive test coverage, and security hardening (fuzzing, sandboxed Jinja2, deserialization allowlists).

RATING: 9.0/10 MAINT: active DRIFT: medium
▸ 1 reusable components found
getmoto/moto ★ 8708 2279 APPLICATION

Moto is a Python library that emulates AWS service APIs in-process for testing and local development. It intercepts boto3/botocore HTTP requests via a custom botocore stubber, dispatches them to per-service in-memory backends registered through a BackendDict pattern, and returns AWS-compatible responses. The library supports decorator/context-manager use, a standalone Flask-based server mode, and an HTTPS proxy mode, making it usable from Python tests, CI pipelines, and non-Python SDKs via a local endpoint.

RATING: 9.0/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
MechanicalSoup/MechanicalSoup ★ 4898 401 APPLICATION

MechanicalSoup is a Python library for automating interaction with websites. It simulates a web browser by automatically storing and sending cookies, following redirects, and submitting forms. It does not execute JavaScript, making it a lightweight alternative to Selenium for sites that rely on server-side logic. The library is built on top of Requests for HTTP sessions and BeautifulSoup for HTML parsing and manipulation. The architecture provides two main classes: Browser (low-level, stateless) and StatefulBrowser (high-level, stateful). StatefulBrowser is the recommended interface, maintaining the current page, URL, and selected form as internal state. Users can open URLs, follow links, select forms, fill in fields, and submit. The Form class handles form manipulation including text inputs, checkboxes, radio buttons, select dropdowns, textareas, and file uploads. It also correctly implements HTML form submission semantics such as disabled controls, fieldset disabling, and multipart encoding. Key entry points include StatefulBrowser.open(), select_form(), submit_selected(), follow_link(), and download_link(). The library depends on requests, beautifulsoup4, and lxml. It is designed as a reusable library, not a standalone application, and is typically installed via pip and imported into user scripts. The codebase is well-tested with 100% coverage, has comprehensive documentation, and follows semantic versioning.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 1 reusable components found
geopy/geopy ★ 4869 670 APPLICATION

Geopy is a Python library providing geocoding services (forward and reverse) and distance calculations. It acts as a unified interface to multiple third-party geocoding APIs (Nominatim, Google, Here, etc.) and includes data structures for points and locations. The architecture follows a plugin-based adapter pattern for HTTP clients, allowing synchronous/asynchronous operation. Key entry points are the geocoder classes in geopy.geocoders and utility modules like distance and point. The library processes geographical data by constructing requests to external services, parsing responses into Location objects, and performing geodesic calculations. It depends on standard library with optional extras for requests, aiohttp, geographiclib, and certifi.

RATING: 9.0/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
jazzband/tablib ★ 4760 622 APPLICATION

Tablib is a mature Python library for working with tabular data in a format-agnostic way. It provides the `Dataset` and `Databook` classes to represent tabular datasets and collections thereof, with a rich API for row/column operations, filtering, sorting, transposition, stacking, and deduplication. The library's core strength is its plugin-based format system: it can import from and export to over a dozen formats including CSV, JSON, YAML, Excel (XLS/XLSX), ODS, HTML, LaTeX, reStructuredText, Jira, DBF, TSV, SQL, and Pandas DataFrames. Formats are dynamically registered and exposed as properties on Dataset/Databook objects, making the interface uniform and extensible. The architecture is a single Python package with a core module (`core.py`) and a formats subpackage containing individual format handlers. The format registry in `formats/__init__.py` uses Python descriptors to lazily load and attach import/export methods, allowing optional dependencies to be installed only when needed. The library is designed for simplicity and readability, following the Zen of Python. It is used in production by organizations like National Geographic and Digg, and is maintained by the Jazzband community with regular releases and comprehensive test coverage across multiple Python versions and operating systems.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 3 reusable components found
celery/django-celery-beat ★ 1952 496 APPLICATION

django-celery-beat is a Django library that provides a database-backed scheduler for Celery Beat, allowing periodic task schedules to be stored and managed in a Django database. It offers models for interval, crontab, solar, and clocked schedules, with a full Django admin interface for CRUD operations. The core scheduler (`DatabaseScheduler`) reads enabled periodic tasks from the database and manages their execution, with change detection via a dedicated `PeriodicTasks` model. The codebase is production-stable, well-tested, and actively maintained, supporting recent Django (6.1) and Python (3.14) versions.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 4 reusable components found
model-bakers/model_bakery ★ 1003 107 APPLICATION

Model Bakery is a mature, well-tested Python library for Django that automates the creation of test fixtures by generating random data for model instances. Its core API (`baker.make()`, `baker.prepare()`, recipes) eliminates boilerplate in test setup while remaining flexible through overrides, sequences, callables, and custom generators. The codebase demonstrates high craftsmanship: a clean separation between field/value generation (`random_gen.py`), attribute classification (`Baker._classify_attrs`), and recipe composition (`recipe.py`). It supports nearly all Django field types, relationships (FK, M2M, O2O, GFK), bulk creation, multi-database setups, and model validation (`_full_clean`). The library is actively maintained with modern tooling (uv, ruff, ty, tox-uv) and follows semantic versioning.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 4 reusable components found
halcy/Mastodon.py ★ 957 171 APPLICATION

Mastodon.py is a mature Python client library for the Mastodon social network API. It provides a comprehensive, type-safe interface to all Mastodon endpoints (statuses, accounts, timelines, notifications, admin, streaming, etc.) with built-in pagination, rate limiting, OAuth authentication, and version compatibility detection. The library is split across multiple modules that compose a single `Mastodon` class via inheritance, offering both synchronous and streaming access. It is extensively tested against a local Mastodon instance using VCR-recorded cassettes and supports optional features like WebPush notifications, blurhash decoding, and grapheme-based status length calculation. The codebase is well-maintained with modern Python packaging (pyproject.toml), type annotations, and support for Python 3.6 through 3.14.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 1 reusable components found
confluentinc/confluent-kafka-python ★ 509 965 APPLICATION

confluent-kafka-python is a production-grade Apache Kafka client library that wraps librdkafka via a C extension. It is not an application with user-facing endpoints; it exposes Python APIs for producing and consuming messages, admin operations, Schema Registry integration, and asyncio variants. Core entry points are confluent_kafka.Producer, confluent_kafka.Consumer, confluent_kafka.AdminClient, confluent_kafka.ShareConsumer, and confluent_kafka.aio.AIOProducer/AIOConsumer. Low-level broker communication happens in C, while the Python layer provides serialization, schema evolution, rules, and callback management.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 5 reusable components found
xtekky/gpt4free ★ 66755 13489 APPLICATION

gpt4free (g4f) is a large-scale, community-driven Python library that aggregates dozens of free AI providers (LLMs, image, audio, video) into a unified, OpenAI-compatible interface. It provides multiple access modes: a Python client library (sync/async), a FastAPI-based API server, a Flask web GUI, a CLI tool, a Model Context Protocol (MCP) server for tool calling, a browser extension, a Discord bot, an Android app, and a Go launcher. The architecture is provider-based: each AI service (e.g., ChatGPT, Gemini, DeepSeek, Copilot, Grok, Perplexity) is wrapped in an adapter class implementing a common `AsyncGeneratorProvider` interface. The system handles authentication via cookies, OAuth flows, HAR files, and browser automation (CDP/nodriver), and supports streaming, tool/function calling, image generation, audio synthesis, and web search. It is primarily an application for consuming free AI models, not a research or data pipeline project, though it includes some data-oriented utilities like token optimization and usage tracking.

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 6 reusable components found
shap/shap ★ 25793 3760 APPLICATION

SHAP (SHapley Additive exPlanations) is a mature Python library for interpreting machine learning model predictions using Shapley values from cooperative game theory. It provides a unified API across model types: tree ensembles (XGBoost, LightGBM, CatBoost, sklearn, PySpark), deep neural networks (TensorFlow, PyTorch), linear models, and arbitrary callables. The architecture is modular: explainers (Tree, Deep, Kernel, Partition, Gradient, Linear, etc.) consume models and maskers (tabular, image, text) to produce Explanation objects, which are visualized via matplotlib or interactive JavaScript force plots. The library includes benchmarks for evaluating explanation quality, extensive test suites with serialization baselines, and C++/CUDA extensions for performance. Although primarily a library (application), it has a strong research character: it originated from academic papers, includes notebooks reproducing experiments, and contains a user study on human interpretability. The codebase is well-engineered with reusable patterns (serialization, OpChain for lazy operations, MaskedModel abstraction), but carries some technical drift from legacy API aliases, dependency version sprawl, and a large minified JavaScript bundle in the repository.

RATING: 8.9/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
raphaelvallat/pingouin ★ 1929 169 APPLICATION

Pingouin is a mature Python library for statistical analysis, providing a comprehensive suite of parametric and non-parametric hypothesis tests, effect sizes, power analysis, Bayes factors, and data visualization. Unlike lower-level libraries like SciPy and statsmodels, Pingouin returns rich, ready-to-interpret DataFrames with all relevant statistics (p-values, confidence intervals, effect sizes, Bayes factors, power) in a single call. The library is designed for researchers and data analysts in the social, biomedical, and behavioral sciences, and its API is tightly integrated with pandas via method chaining (e.g., `df.anova()`, `df.pairwise_corr()`). The codebase is modular, with each module dedicated to a class of statistical methods (parametric, nonparametric, correlation, regression, etc.), and includes bundled example datasets and extensive documentation. Its architecture follows a functional pattern built on top of NumPy, SciPy, pandas, and statsmodels, with optional dependencies for plotting and machine learning. The library is actively maintained, with a recent release (v0.6.1) and CI/CD pipelines ensuring compatibility with Python 3.10–3.14 and the latest versions of its scientific stack.

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
neka-nat/probreg ★ 990 152 APPLICATION

probreg is a Python library designed for robust point cloud registration, implementing a suite of probabilistic algorithms including Coherent Point Drift (CPD), FilterReg, Bayesian CPD (BCPD), and GMMTree. It serves as a specialized tool for computer vision and robotics applications requiring the alignment of 3D point sets under rigid, affine, or non-rigid transformations. The library provides a clean Python API that abstracts complex mathematical operations, allowing users to register point clouds with support for both CPU (OpenMP) and GPU (CuPy) acceleration. Architecturally, the project follows a hybrid model where performance-critical kernels are implemented in C++ and exposed to Python via pybind11. This ensures high computational efficiency for operations like the Kabsch algorithm, point-to-plane distance calculations, and permutohedral lattice filtering. The Python layer manages the orchestration of these kernels, handling data I/O (via Open3D), transformation modeling, and iterative optimization loops. The codebase is well-structured with distinct modules for cost functions, transformations, and specific registration algorithms, promoting modularity and extensibility. The repository demonstrates strong engineering practices with a comprehensive test suite covering core algorithms, CI/CD pipelines for cross-platform builds (Ubuntu/Windows), and Sphinx documentation. It includes example scripts that serve as both documentation and validation for the library's functionality. The inclusion of C++ extensions and dependency on Eigen and pybind11 indicates a mature build system capable of handling complex native compilation requirements. The project is actively maintained with recent commits and a stable versioning strategy.

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