skillfed

mongo-query-match

A utility library that provides a MongoDB-like query language for querying python collections. It's mainly intended to parse objects structured as fundamental types in a similar fashion to what is produced by JSON or YAML parsers.

mongo-query-match v2.0.0 182.0K downloads/30d#10,109 on PyPI
License unclear DORMANT released

What it is and what it does

mongo-query-match is a standalone query engine that lets you write MongoDB-style queries to filter Python dictionaries and lists without connecting to a database. It parses query objects (dicts with operators like $eq, $regex, $elemMatch) and applies them to in-memory Python collections, following MongoDB version 3.4 query semantics. The library is intended for filtering JSON or YAML-like structured data—records with strings, numbers, booleans, nulls, and nested objects.

The package has no external dependencies and installs quickly. It supports most common MongoDB query operators but omits geospatial queries, text search, and projection operators. It's useful when you want MongoDB's expressive query syntax for local data processing, testing, or prototyping without database overhead.

Use it for:

  • Filter test fixtures or mock data using MongoDB query syntax in unit tests.
  • Query JSON or YAML configuration files and data exports without loading them into a database.
  • Prototype query logic locally before migrating to a real MongoDB instance.
  • Build in-memory query layers for applications that need flexible filtering on structured data.
  • Match records against complex criteria in data pipelines or ETL workflows.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a MongoDB-like query language for filtering and matching Python dictionaries and collections, translating MongoDB query syntax into Python without requiring a database.

Yes, if you need MongoDB query syntax for local Python collections and can accept dormant maintenance. No external dependencies and low friction make it safe to add. However, verify the license before use in proprietary contexts, and be aware that the package has not been updated in over a year—do not expect active bug fixes or new features.

Install

mongo-query-match on PyPI

pip

pip install mongo-query-match

uv

uv add mongo-query-match

poetry

poetry add mongo-query-match

Installing mongo-query-match

Before you install

Low install friction with no runtime dependencies. Package is marked dormant (558 days since release) with minimal maintenance activity.

License in practice

License treatment is unclear—no SPDX identifier or raw license text is available. Verify the actual license before use in proprietary or restricted contexts.

Quickstart

from mongo_query_match import Query

records = [{"a": 5}, {"a": 3}]
query = Query({"a": 3})
matched = [r for r in records if query.match(r)]

Requires Python 3.9 or later (supports >=3.9,<4).

Verify before relying

  • Whether the package is actively maintained or accepting bug reports despite dormant status.
  • Exact license terms—verify before using in commercial or restricted-license projects.
  • Performance characteristics when filtering large collections or deeply nested documents.

Package facts

License not declared (unclear)
Python support supports the current Python release (<4,>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 558 days since the last release
First released
Downloads 181,970/month — #10,109 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mongo_query_match-2.0.0-py3-none-any.whl

Keywords: match, mongodb, query

Development Status :: 5 - Production/StableProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Utilities

Tags

mongodb query language pythonfilter dictionaries with mongodb syntaxquery python collectionsmongodb-like matchingjson document filtering
query-languagedata-filteringmongodb-compatible

More Utilities packages