Flapjack Search Python SDK
A fully-featured Python API client for Flapjack Search. Drop-in replacement for algoliasearch.
Getting Started
pip install flapjack-search
Basic usage
from flapjacksearch.search.client import SearchClientSync
from flapjacksearch.search.config import SearchConfig
from flapjacksearch.http.hosts import Host, HostsCollection, CallType
# For self-hosted Flapjack server
config = SearchConfig("my-app", "my-api-key")
config.hosts = HostsCollection([
Host(url="search.example.com", scheme="https", accept=CallType.READ | CallType.WRITE)
])
client = SearchClientSync.create_with_config(config=config)
# Index some data
client.save_objects(
index_name="products",
objects=[
{"objectID": "1", "name": "iPhone 15", "brand": "Apple", "price": 999},
{"objectID": "2", "name": "Galaxy S24", "brand": "Samsung", "price": 899},
],
)
# Search
from flapjacksearch.search.models import SearchMethodParams, SearchForHits, SearchQuery
result = client.search(
search_method_params=SearchMethodParams(
requests=[SearchQuery(SearchForHits(index_name="products", query="iphone"))]
)
)
for hit in result.results[0].actual_instance.hits:
print(hit.name, hit.price)
Local development
config = SearchConfig("test-app", "test-api-key")
config.hosts = HostsCollection([
Host(url="localhost:7700", scheme="http", accept=CallType.READ | CallType.WRITE)
])
client = SearchClientSync.create_with_config(config=config)
Async support
from flapjacksearch.search.client import SearchClient
# Async client — same API, just use await
client = SearchClient.create_with_config(config=config)
result = await client.search(...)
Migrating from Algolia?
Switching from algoliasearch takes about 5 minutes:
pip uninstall algoliasearch
pip install flapjack-search
- from algoliasearch.search.client import SearchClientSync
+ from flapjacksearch.search.client import SearchClientSync
- from algoliasearch.search.models import SearchMethodParams, SearchForHits, SearchQuery
+ from flapjacksearch.search.models import SearchMethodParams, SearchForHits, SearchQuery
All method signatures, parameters, and response types are identical. Your existing code works with just the import change.
See MIGRATION.md for the full migration guide.
API compatibility
Every method from Algolia's Python v4 SDK works identically:
| Operation | Method | Works? |
|---|---|---|
| Search | client.search(...) |
Yes |
| Save objects | client.save_objects(...) |
Yes |
| Get object | client.get_object(...) |
Yes |
| Partial update | client.partial_update_object(...) |
Yes |
| Delete object | client.delete_object(...) |
Yes |
| Get settings | client.get_settings(...) |
Yes |
| Set settings | client.set_settings(...) |
Yes |
| Synonyms | client.save_synonyms(...) |
Yes |
| Rules | client.save_rules(...) |
Yes |
| List indices | client.list_indices() |
Yes |
| Wait for task | client.wait_for_task(...) |
Yes |
| API keys | client.add_api_key(...) |
Yes |
Troubleshooting
Encountering an issue? Open a GitHub issue and we'll help.
License
MIT
Metadata
Release files for flapjack-search 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flapjack_search-1.0.0.tar.gz | 403.2 kB | Without provenance | Details for flapjack_search-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flapjack_search-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for flapjack_search-1.0.0-py3-none-any.whl |
Total release size: 1.5 MB
Release files / flapjack_search-1.0.0.tar.gz
| Download URL | flapjack_search-1.0.0.tar.gz |
|---|---|
| Size | 403.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b764e9c11d8b12bd608ed87adec85d683410580d608e2d355d7588a39cd7d25
|
|
BLAKE2b-256 checksum How to use checksums |
26dfa7479877262b91214fac05c7f3dbb9819b854e4b891cc898595ab458d15c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.5 Darwin/25.3.0
|
Release files / flapjack_search-1.0.0-py3-none-any.whl
| Download URL | flapjack_search-1.0.0-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a6cbc7a1996cddcbfbe9310709af311905285c3511ece692ed8c3f351b12683
|
|
BLAKE2b-256 checksum How to use checksums |
b3d14970b71a2744be961fbd11620638caf1e2dccbdcc79d85ba301f920ecf10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.5 Darwin/25.3.0
|
Security for flapjack-search 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.