https://github.com/algolia/algoliasearch-client-python
⚡️ A fully-featured and blazing-fast Python API client to interact with Algolia.
https://github.com/algolia/algoliasearch-client-python
algolia python search
Last synced: 5 months ago
JSON representation
⚡️ A fully-featured and blazing-fast Python API client to interact with Algolia.
- Host: GitHub
- URL: https://github.com/algolia/algoliasearch-client-python
- Owner: algolia
- License: mit
- Created: 2013-05-22T13:57:40.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2025-06-18T14:28:11.000Z (5 months ago)
- Last Synced: 2025-06-18T15:35:10.328Z (5 months ago)
- Topics: algolia, python, search
- Language: Python
- Homepage: https://www.algolia.com/doc/api-client/getting-started/install/python/?language=python
- Size: 67.8 MB
- Stars: 203
- Watchers: 80
- Forks: 66
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-blazingly-fast - algoliasearch-client-python - ⚡️ A fully-featured and blazing-fast Python API client to interact with Algolia. (Python)
- awesome-algolia - Python
README
The perfect starting point to integrate Algolia within your Python project
Documentation •
Django •
Community Forum •
Stack Overflow •
Report a bug •
FAQ •
Support
## ✨ Features
- Thin & minimal low-level HTTP client to interact with Algolia's API
- Supports Python from `3.8`
## 💡 Getting Started
First, install Algolia Python API Client via the [pip](https://pip.pypa.io/en/stable/installing) package manager:
```bash
pip install --upgrade 'algoliasearch>=4.0,<5.0'
```
You can now import the Algolia API client in your project and play with it.
```py
from algoliasearch.search.client import SearchClient
_client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")
# Add a new record to your Algolia index
response = await _client.save_object(
index_name="",
body={
"objectID": "id",
"test": "val",
},
)
# use the class directly
print(response)
# print the JSON response
print(response.to_json())
# Poll the task status to know when it has been indexed
await client.wait_for_task(index_name="", task_id=response.task_id)
# Fetch search results, with typo tolerance
response = await _client.search(
search_method_params={
"requests": [
{
"indexName": "",
"query": "",
"hitsPerPage": 50,
},
],
},
)
# use the class directly
print(response)
# print the JSON response
print(response.to_json())
```
For full documentation, visit the **[Algolia Python API Client](https://www.algolia.com/doc/libraries/python/)**.
## ❓ Troubleshooting
Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/api-client/troubleshooting/faq/python/) where you will find answers for the most common issues and gotchas with the client. You can also open [a GitHub issue](https://github.com/algolia/api-clients-automation/issues/new?assignees=&labels=&projects=&template=Bug_report.md)
## Contributing
This repository hosts the code of the generated Algolia API client for Python, if you'd like to contribute, head over to the [main repository](https://github.com/algolia/api-clients-automation). You can also find contributing guides on [our documentation website](https://api-clients-automation.netlify.app/docs/introduction).
## 📄 License
The Algolia Python API Client is an open-sourced software licensed under the [MIT license](LICENSE).