Framework-independent package for converting query strings to Elasticsearch queries
Project description
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
Release history Release notifications | RSS feed
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.1.tar.gz
(64.2 kB
view details)
Built Distribution
File details
Details for the file snovault-search-1.0.1.tar.gz
.
File metadata
- Download URL: snovault-search-1.0.1.tar.gz
- Upload date:
- Size: 64.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4041f86d4c2ff03fc0b0118819283a34b9def2f3b854ba2e24be5c4aa4705069 |
|
MD5 | f141de702bf9b7aa820504c7132000f3 |
|
BLAKE2b-256 | d679d598ff0f850764fee97df88a3d5fd3610a56eb7bd51d0998171d6d7b15cc |
File details
Details for the file snovault_search-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: snovault_search-1.0.1-py3-none-any.whl
- Upload date:
- Size: 72.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2149ee06a91404974dd90c1ee8fca7151c26aed823ba5ded84cb88de94e9ba5 |
|
MD5 | 3db45cd9e49196daaa1753de1b4cbd7e |
|
BLAKE2b-256 | 2f33a3f96beb207f09310683b3918f366bbe539f0e342be4797e8e93b0e587e3 |