A fully-featured and blazing-fast Python API client to interact with Algolia.
Project description
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 package manager:
pip install --upgrade 'algoliasearch>=4.0,<5.0'
You can now import the Algolia API client in your project and play with it.
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="<YOUR_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="<YOUR_INDEX_NAME>", task_id=response.task_id)
# Fetch search results, with typo tolerance
response = await _client.search(
search_method_params={
"requests": [
{
"indexName": "<YOUR_INDEX_NAME>",
"query": "<YOUR_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.
❓ Troubleshooting
Encountering an issue? Before reaching out to support, we recommend heading to our FAQ where you will find answers for the most common issues and gotchas with the client. You can also open a GitHub issue
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. You can also find contributing guides on our documentation website.
📄 License
The Algolia Python API Client is an open-sourced software licensed under the MIT license.
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
Built Distribution
File details
Details for the file algoliasearch-4.9.0.tar.gz
.
File metadata
- Download URL: algoliasearch-4.9.0.tar.gz
- Upload date:
- Size: 329.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5825cb6aa478037aa457dcd638e44e5783b06dfb37c37da7407dc7e8692d2dc |
|
MD5 | a60ee1d6f6411b46d0a6163a86dc4095 |
|
BLAKE2b-256 | 44f63fd170a2687a0e8e37a1559bb69dba5bc9aacea5c32d35b5ed96e8a8f1e0 |
Provenance
The following attestation bundles were made for algoliasearch-4.9.0.tar.gz
:
Publisher:
release.yml
on algolia/algoliasearch-client-python
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
algoliasearch-4.9.0.tar.gz
- Subject digest:
c5825cb6aa478037aa457dcd638e44e5783b06dfb37c37da7407dc7e8692d2dc
- Sigstore transparency entry: 148918634
- Sigstore integration time:
- Predicate type:
File details
Details for the file algoliasearch-4.9.0-py3-none-any.whl
.
File metadata
- Download URL: algoliasearch-4.9.0-py3-none-any.whl
- Upload date:
- Size: 816.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62970c6c27b42ba120a2c876fb0de5da9fcfadef8dba65caced4809b48eb59e9 |
|
MD5 | e21765963b20f4bfc59e584c8504160d |
|
BLAKE2b-256 | 10f5692112893da031ceb42c715ededb895cb85a06439e267d69cb509a951cec |
Provenance
The following attestation bundles were made for algoliasearch-4.9.0-py3-none-any.whl
:
Publisher:
release.yml
on algolia/algoliasearch-client-python
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
algoliasearch-4.9.0-py3-none-any.whl
- Subject digest:
62970c6c27b42ba120a2c876fb0de5da9fcfadef8dba65caced4809b48eb59e9
- Sigstore transparency entry: 148918635
- Sigstore integration time:
- Predicate type: