Skip to main content

Search Document by Field and Value.

Project description

Documentation Status!--None.svg?style=social

Welcome to invsearch Documentation

A fast document search engine allow search by field and value pair.


>>> from invsearch import InvIndex
>>> ii = InvIndex([
...     {"id": 1, "name": "Alice", "friends": [2, 3]},
...     {"id": 2, "name": "Bob", "age": 15, "friends": [1, 3]},
...     {"id": 3, "name": "Cathy", "age": None, "friends": [1, 2]},
...     {"id": 4, "name": "Bob", "age": None},
... ])
>>> ii.find_one(id=1)
{"id": 1, "name": "Alice", "friends": [2, 3]}
>>> ii.find(name="Bob")
[{"id": 2, "name": "Bob", "age": 15, "friends": [1, 3]}, {"id": 4, "name": "Bob", "age": None}]
>>> ii.by_id(id=1)
{"id": 1, "name": "Alice", "friends": [2, 3]}


invsearch is released on PyPI, so all you need is:

$ pip install invsearch

To upgrade to latest version:

$ pip install --upgrade invsearch

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for invsearch, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size invsearch-0.0.2.tar.gz (13.5 kB) File type Source Python version None Upload date Hashes View
Filename, size invsearch-0.0.2-py2.py3-none-any.whl (19.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page