--- id: coola version: "1.1.10" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # coola — Library to check equality between two complex/nested objects License: permissive · Maintenance: active · Downloads: 1.0M/mo ## What it is and what it does coola is a lightweight equality-checking library for scientific Python that solves the problem of comparing complex nested structures containing tensors, arrays, and DataFrames—objects where Python's native `==` operator fails or produces unexpected results. It provides three main functions: `objects_are_equal()` for strict comparison, `objects_are_allclose()` for numerical tolerance, and difference reporting to show exactly what differs between two structures. Beyond equality checking, coola also offers utilities for data summarization (human-readable nested structure summaries), conversion between list-of-dicts and dict-of-lists formats, mapping utilities for flattening and filtering nested dictionaries, systematic traversal via depth-first and breadth-first search, and reduction operations (min, max, mean, median, quantile, std) on numeric sequences with pluggable backends. It has no core dependencies, making it lightweight, and supports modern Python versions (3.10 and above). Use it for: - Unit testing: Compare expected and actual outputs in tests with clear failure messages showing structural differences. - Numerical validation: Check if two nested structures are equal within a tolerance using `objects_are_allclose()`. - Data pipeline debugging: Summarize and compare intermediate results to identify where data diverges. - Configuration comparison: Flatten and compare nested configuration dictionaries or extract specific values. - Batch processing: Traverse nested collections using DFS/BFS to filter or extract specific data types. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. coola compares complex nested data structures containing tensors, arrays, DataFrames, and other scientific objects for exact or approximate equality, with detailed difference reporting. Yes. coola is actively maintained, has no core dependencies, supports current Python versions, carries no known vulnerabilities, and solves a real problem for anyone working with nested data structures in testing or validation. The permissive BSD-3-Clause license poses no restrictions. Install it if you regularly compare complex objects. ## Install pip install coola uv add coola poetry add coola ## Installing coola Before you install: Low install friction with no runtime dependencies; actively maintained with a release 15 days ago and recent commits. License in practice: BSD-3-Clause is permissive; you can use, modify, and distribute coola freely in commercial and private projects with minimal restrictions. Quickstart: pip install coola from coola.equality import objects_are_equal data1 = {"key": "value1"} data2 = {"key": "value1"} result = objects_are_equal(data1, data2) print(result) # True Requires Python 3.10 or higher; optional dependencies must be installed separately to compare specific types like tensors or arrays. Verify before relying: - Whether custom comparators can be registered for user-defined types beyond the documented supported types - Performance characteristics when comparing very large nested structures or deeply nested hierarchies - Whether the library handles circular references in nested structures ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags compare nested data structures, equality testing for complex objects, dataframe comparison, numerical tolerance comparison, nested structure diff reporting, tensor array comparison, testing, data-structures, scientific-computing [View on SkillFed](https://skillfed.io/packages/coola) · [View on PyPI](https://pypi.org/project/coola/)