Skip to main content

A fully-featured and blazing-fast Python API client to interact with Algolia.

Project description

Algolia for Python

The perfect starting point to integrate Algolia within your Python project

PyPI Python versions License

DocumentationDjangoCommunity ForumStack OverflowReport a bugSupport

✨ 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

algoliasearch-4.44.3.tar.gz (460.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

algoliasearch-4.44.3-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file algoliasearch-4.44.3.tar.gz.

File metadata

  • Download URL: algoliasearch-4.44.3.tar.gz
  • Upload date:
  • Size: 460.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for algoliasearch-4.44.3.tar.gz
Algorithm Hash digest
SHA256 1c5e3b72912ef162bc0e772c84767e7db48f5549e375d88930aed8b78a1db3b3
MD5 98847fc0fe8776d9d155f7ad032892a4
BLAKE2b-256 aee3d92bebdd9794cc00ad72b333d39354ea1ab5b7d5cde2ea69f4a3265212fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for algoliasearch-4.44.3.tar.gz:

Publisher: release.yml on algolia/algoliasearch-client-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file algoliasearch-4.44.3-py3-none-any.whl.

File metadata

  • Download URL: algoliasearch-4.44.3-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for algoliasearch-4.44.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6326db9d102e0c43712c04334bb9a9e8bd980c7bc1a471cb75b320f4d606953d
MD5 2d57add8fb12e774bfdcdc31caa598a9
BLAKE2b-256 320584c46d0844055735c1192ba1a0364d871251dbf03e26a465eedf148e63f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for algoliasearch-4.44.3-py3-none-any.whl:

Publisher: release.yml on algolia/algoliasearch-client-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page