Django Framework for the Python Search API

Features

  • Made to simplify the usage of Algolia’s API within the Django Framework
  • Asynchronous methods built on top of Asyncio
  • Background retry strategy to ensure uptime
  • Seamless batching via iterators to optimize number of network calls
  • Zero downtime reindexing feature
  • API access to all Algolia functionality, AI products, and advanced features, including Recommend 

Version

  • Compatible with Python 2.7 and Python 3.4+
  • Supports Django 1.7+, 2.x and 3.x.

Related Integrations

Python API Client, Autocomplete, InstantSearch

Key links


Get started

INSTALL

1pip install --upgrade 'algoliasearch-django>=2.0,<3.0'

INDEX

1import algoliasearch_django as algoliasearch
2
3from .models import YourModel
4
5algoliasearch.register(YourModel)
6class YourModel(AlgoliaIndex):
7    fields = ('name', 'date')
8    index_name = 'my_index'

SEARCH

1from algoliasearch_django import raw_search
2
3params = { "hitsPerPage": 5 }
4response = raw_search(Contact, "jim", params)

Built with Algolia