Skip to main content

Framework-independent package for converting query strings to Elasticsearch queries

Project description

CircleCI Coverage Status

snovault-search

Framework-independent package for converting query strings to Elasticsearch queries.

Install

$ pip install snovault-search

Example

from snosearch.defaults import DEFAULT_ITEM_TYPES
from snosearch.fields import BasicSearchResponseField
from snosearch.parsers import ParamsParser
from snosearch.responses import FieldedResponse


def basic_search_view(request):
    fr = FieldedResponse(
        _meta={
            'params_parser': ParamsParser(request)
        },
        response_fields=[
            BasicSearchResponseField(
                default_item_types=DEFAULT_ITEM_TYPES
            )
        ]
    )
    return fr.render()

Run tests

$ pip install -e .[test]
$ pytest

Publish on PyPI

Bump version in setup.cfg, then build and upload:

$ python -m build
$ twine upload dist/*

Project details


Download files

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

Source Distribution

snovault-search-1.0.2.tar.gz (63.2 kB view details)

Uploaded Source

Built Distribution

snovault_search-1.0.2-py3-none-any.whl (72.6 kB view details)

Uploaded Python 3

File details

Details for the file snovault-search-1.0.2.tar.gz.

File metadata

  • Download URL: snovault-search-1.0.2.tar.gz
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.8

File hashes

Hashes for snovault-search-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c553795cd11c187efde851ed010f69a428f78986d2c65073b65999b237109e28
MD5 b07a75d02d78ed6dd607a4b9f2dc94ce
BLAKE2b-256 94b84b65126d6c4c830118c7b303cb8ef4bea93f99b2bd112138c89ae2c01f73

See more details on using hashes here.

File details

Details for the file snovault_search-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: snovault_search-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 72.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.8

File hashes

Hashes for snovault_search-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec181cfb444a71070eb9c83c9e6b0ab05e9d173168b262b1e244604c36661a6b
MD5 a6ccd2c3f36084c2fd6df10de1e35ce3
BLAKE2b-256 11dda10b0c7ee3b2134ca6c932c6cd7ea199e770a60ab04e885c032def8fd653

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page