seekgist: SeekGist for Python
The official Python client for the SeekGist API: Arabic-first e-commerce
search, suggest, catalog sync and webhooks. Python 3.12+, sync (SeekGist) and asyncio
(AsyncSeekGist) clients on httpx, fully typed (py.typed, TypedDicts for every request and
response).
pip install seekgist
Documentation: https://seekgist.com/docs. Support: support@seekgist.com.
Quick start
from seekgist import SeekGist
with SeekGist(api_key="sg_sec_...") as client: # or set SEEKGIST_API_KEY
products = [{"id": "42", "name": {"en": "Desk lamp", "ar": "مصباح مكتب"}, "price": "12.500", "currency": "JOD"}]
summary = client.upsert_products(products) # batches, retries, one Idempotency-Key per batch
print(summary.upserted, summary.errors)
res = client.find("مصباح", lang="ar", per_page=12)
print(res.data["ids"]) # product ids in rank order; res.data["hits"] has the product cards
print(res.usage, res.request_id) # searches used this period; quote the request id to support
from seekgist import AsyncSeekGist
async with AsyncSeekGist() as client:
res = await client.find("white sneakers", lang="en")
Keys: a public key (sg_pub_...) can search, suggest, recommend and send events.
A secret key (sg_sec_...) can do everything an API key may; keep it on your server.
Options: base_url (default https://api.seekgist.com, or SEEKGIST_BASE_URL), timeout
(10 s per attempt), max_retries (2), headers, http_client.
All API methods
One namespace per API area, one method per operation, keyword arguments only:
client.search, events, catalog, imports, connectors, jobs, synonyms, rules,
experiments, translation, analytics, webhooks, account, billing, health, files.
Catalog translation works: translation.backfill, status, review_*, glossary_*, export,
approved and ack. Not available on this platform: the chat methods. They answer
404 feature_unavailable.
client.synonyms.create(body={"kind": "equivalent", "terms": ["sneakers", "trainers", "سنيكرز"]})
client.catalog.products_get(product_id="42")
client.analytics.stats(report="top_queries", from_="2026-10-01") # `from` is a keyword: from_
client.search.search_get(q="sneakers", options={"query": {"filter[brand]": ["Nike", "Adidas"]}})
r = client.request("search_post", body={"q": "dress"}) # any operation, with headers
Every method takes options={"timeout", "max_retries", "idempotency_key", "headers", "query"}.
Dashboard sign-in, admin and store-app callback endpoints are not in the SDK on purpose.
Helpers
| Helper | What it does |
|---|---|
client.find(q, **fields) |
POST /v1/search; returns ApiResponse with .usage |
client.upsert_products(products, batch_size=500, delete_ids=..., replace_all=False, key_prefix=None, on_batch=None) |
Batches of up to 1,000 with one Idempotency-Key per batch (<key_prefix>-<n>) and 5 retries; the same key_prefix again = safe resume; replace_all=True = full sync. Returns UpsertSummary |
client.wait_for_job(job_id) |
Polls GET /v1/jobs/{id} until done |
client.pages(lambda c: client.synonyms.list(cursor=c)) |
Every item of a cursor list |
AsyncSeekGist.suggester(debounce=0.12, lang=..., products=...) |
await s.input(text): debounced, drops out-of-date answers, caches; None for short or stale text. Suggest is never billed |
verify_webhook(secret, headers, raw_body) |
Standard Webhooks signature + 5-minute time check; returns the event |
parse_usage(header) |
Reads X-SeekGist-Usage |
Debounce matters where people type: in a browser use the JS SDK (@seekgist/sdk) or the
widget. In Python the suggester is for asyncio code such as a chat bot or a server-side proxy.
Errors, retries and idempotency
ApiError(status,code,request_id,field_errors,retry_after_s): usecodein your program.TimeoutError,ConnectionError: no answer.WebhookVerificationError: bad webhook. All areSeekGistError.- Retries (default 2, backoff 0.5 s, 1 s, 2 s ... with jitter;
Retry-Afterwins): GET calls, search, and writes that take anIdempotency-Key(the SDK adds one and keeps it across retries). Other writes (click, event) are never retried after a network error or a 5xx; a 429 is retried for every call. - Store search pages:
SeekGist(timeout=0.3, max_retries=0)and fall back to the store's own search on anySeekGistError.
Examples
examples/search.py, examples/sync_catalog.py, examples/webhook_receiver.py (standard
library server), examples/async_suggest.py.
Development
From a clone of https://github.com/seekgist/seekgist-python:
pip install -e . pytest pytest-asyncio
pytest
Bugs and questions: https://github.com/seekgist/seekgist-python/issues or support@seekgist.com.
License
MIT. See LICENSE.
Metadata
Release files for seekgist 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 | |
|---|---|---|---|---|
| seekgist-1.0.0.tar.gz | 45.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seekgist-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 114.3 kB
Release files / seekgist-1.0.0.tar.gz
| Download URL | seekgist-1.0.0.tar.gz |
|---|---|
| Size | 45.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3880e7cd3c4343d1bc9483e50c1f04b0e2ea50e431343df7430e029f2231e33
|
|
BLAKE2b-256 checksum How to use checksums |
52ca23f58433477a19ae86c312e69a05e4f8c04d431f77b00367cd848e129946
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / seekgist-1.0.0-py3-none-any.whl
| Download URL | seekgist-1.0.0-py3-none-any.whl |
|---|---|
| Size | 68.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8caf37e42dc2583acc7b77c638b72ddd3d20af2f531f7d8ad497173e7fa36f2e
|
|
BLAKE2b-256 checksum How to use checksums |
70d5fa15516bee9720f65b5b5844801e3a6a24f6d31aa1c10039042d303fe2d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for seekgist 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.