This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.9.1 instead.
Reason given by maintainers: Too many breaking changes for a patch release
Haystack for Django REST Framework
Build status
About
Small library which tries to simplify integration of Haystack with Django REST Framework. Fresh documentation available on Read the docs!
Supported versions
- Python >=3.11, <3.15
- Django >=5.2, <6.2
- Haystack >=3.3.0, <4
- Django REST Framework >=3.16
- Elasticsearch >=7.0.0, <8
Installation
$ pip install drf-haystack
Supported features
We aim to support most features Haystack does (or at least those which can be used in a REST API). Currently, we support:
- Autocomplete
- Boost (Experimental)
- Faceting
- Geo Spatial Search
- Highlighting
- More Like This
Show me more!
from drf_haystack.serializers import HaystackSerializer
from drf_haystack.viewsets import HaystackViewSet
from myapp.search_indexes import PersonIndex # You would define this Index normally as per Haystack's documentation
# Serializer
class PersonSearchSerializer(HaystackSerializer):
class Meta:
index_classes = [PersonIndex]
fields = ["firstname", "lastname", "full_name"]
# ViewSet
class PersonSearchViewSet(HaystackViewSet):
index_models = [Person]
serializer_class = PersonSerializer
That's it, you're good to go. Hook it up to a DRF router and happy searching!
Release files for drf-haystack 1.9.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| drf_haystack-1.9.3.tar.gz | 59.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drf_haystack-1.9.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 78.4 kB
Release files / drf_haystack-1.9.3.tar.gz
| Download URL | drf_haystack-1.9.3.tar.gz |
|---|---|
| Size | 59.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
547df25d77d241824e033c41252a92d8d194456f8b28fe7e6a90588381aba266
|
|
BLAKE2b-256 checksum How to use checksums |
96153a628cedea34bb61ae20c42c6d5b11662c9d975bfcb6ec46de0cdc1e2a22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / drf_haystack-1.9.3-py3-none-any.whl
| Download URL | drf_haystack-1.9.3-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51d7b8f1ca0d540d90ecc080a610d1b7d40ec1e4e3f5d96cd02c655b1e4f5df5
|
|
BLAKE2b-256 checksum How to use checksums |
6c2351d0360737fbdc8bac5e00cbfe89e884fe4e4d93b4504b875b2cb8588c81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|