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

Uploaded Source

Built Distribution

snovault_search-1.0.4-py3-none-any.whl (74.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: snovault-search-1.0.4.tar.gz
  • Upload date:
  • Size: 65.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.4.tar.gz
Algorithm Hash digest
SHA256 06493bf67447fc2f2b8a417e4a8713701d07dac7aa090ccb5ef517c452f66b45
MD5 e9b0d482f0ae41b591c95cef04d26a9c
BLAKE2b-256 ad26d8c7b5718c31f2e7dc192eea86433498b4d32546866a67067c0315bfe067

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snovault_search-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 74.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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3df8db12c37ba838c4d5ef87676f614c588756b0c2f38778a80fc6be8b56184c
MD5 63154381bb560007d43ed6e0a4e6c0ea
BLAKE2b-256 459ff0a7d8e505ff6b3bef112c8ffcbdb90d40a4fcf8bb25d0afbf976f69a840

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