Framework-independent package for converting query strings to Elasticsearch queries
Project description
snovault-search
Framework-independent package for converting query strings to Elasticsearch queries.
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.0.tar.gz
(23.7 kB
view details)
Built Distribution
File details
Details for the file snovault-search-1.0.0.tar.gz
.
File metadata
- Download URL: snovault-search-1.0.0.tar.gz
- Upload date:
- Size: 23.7 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 | 5a02d3a3e70a385847e1ef68ca246808438874ff46c18aea2264a3b382246ff2 |
|
MD5 | f9386f1c23ff8c60b0deecd62b743498 |
|
BLAKE2b-256 | 797b684d1ff82601e83768a42e70cffacfd4c616b5eb52616084df7cb2154373 |
File details
Details for the file snovault_search-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: snovault_search-1.0.0-py3-none-any.whl
- Upload date:
- Size: 27.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 | b6eb3248bfb5f1e331a9f83fb61c4e9f829ad5dc18e6550678c539e4bd2f1d7d |
|
MD5 | c8e2eb54f73c262636f93be3aed9a4cf |
|
BLAKE2b-256 | 60eafef433b5de1ae7efaf0bd052eebce401327d18525ee5cdf30d8c8bdc92aa |