Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A fully-featured and blazing-fast Python API client to interact with Algolia.
Documentation • Django • Community Forum • Stack Overflow • Report a bug • FAQ • Support
3.8
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.
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
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.
The Algolia Python API Client is an open-sourced software licensed under the MIT license.
FAQs
A fully-featured and blazing-fast Python API client to interact with Algolia.
We found that algoliasearch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.