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.3.tar.gz (64.1 kB view details)

Uploaded Source

Built Distribution

snovault_search-1.0.3-py3-none-any.whl (73.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: snovault-search-1.0.3.tar.gz
  • Upload date:
  • Size: 64.1 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.3.tar.gz
Algorithm Hash digest
SHA256 e93a9c9d3c6f29cb9ff9180137b0d35cb6ea5d61ab1629f0f6331a719517cf40
MD5 0535834db402de0860880817edfb3ca6
BLAKE2b-256 bb810fe4961022068f48e6d3ef37acae80f811d229b460baf5b8f4c9df9345ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snovault_search-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 73.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 33fad33b692198aba03f73d1d105da0c832083237ce3d660f563f3f28fb94a2f
MD5 62d278e3a346f4b87c14e12afb004da9
BLAKE2b-256 a49a129f0db2ebceb120839fa898ed9bbe0e22d7790779dd440954f8df717718

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