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.
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-matchuv
uv add mongo-query-matchpoetry
poetry add mongo-query-matchInstalling 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
djongoDjongo translates Django ORM queries into…
permissive · top 15,000 on PyPI
jsonquerylangExecutes queries against JSON data using a…
permissive · top 15,000 on PyPI
pymongo-search-utilsProvides utility functions for vector search…
permissive · top 15,000 on PyPI
magic-filterProvides a filter mechanism based on dynamic…
permissive · top 5,000 on PyPI
yaqlYAQL is an embeddable query language for Python…
permissive · top 15,000 on PyPI
Flask-PyMongoFlask-PyMongo integrates MongoDB database…
permissive · top 15,000 on PyPI
pydantic-mongoProvides a Repository pattern for MongoDB with…
permissive · top 15,000 on PyPI
ponyPony is an object-relational mapper that lets…
permissive · top 15,000 on PyPI
bc-jsonpath-ngParses and queries JSON structures using…
permissive · top 5,000 on PyPI
jqPython bindings for jq 1.8.2 that let you…
permissive · top 5,000 on PyPI