Registry / search / sonic-client

sonic-client

JSON →
library1.0.0pypypiunverified

Sonic Client is a Python library for interacting with Sonic, a fast and lightweight search backend. Version 1.0.0 provides a simple client for indexing and searching text. The project appears to be in early stages with infrequent releases.

pip install sonic-client
INSTALL
IMPORT
SIG · SONIC-CLIENT
S
sonic-client
searchpythonv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SonicClient
from sonic_client import SonicClient
from sonic import SonicClient
Correct module name uses underscore: sonic_client

Connect to Sonic and push a string into the 'messages' collection.

import os from sonic_client import SonicClient client = SonicClient( host=os.environ.get('SONIC_HOST', 'localhost'), port=1491, password=os.environ.get('SONIC_PASSWORD', 'SecretPassword'), connect_timeout=5 ) # Example: push a text into a collection client.push('messages', 'default', 'user:1', 'Hello world!')
Debug
Known issues
breakingThe library requires Sonic server running with channel mode; ensure Sonic is configured with 'channel' mode enabled.
fix
Start Sonic with '--channelize' or set 'channelize' in config file.
affects: all
gotchaImport uses 'sonic_client' (underscore) not 'sonicclient' or 'sonic'.
fix
Use: from sonic_client import SonicClient
affects: all
deprecatedThe library has no explicit deprecation policy; version 1.0.0 is initial release and may change abruptly.
fix
Pin version in requirements and test upgrades.
affects: >=1.0.0
Upgrade
Version history
1.0.0latest on PyPI · released Jun 1, 2023
Audit
Dependencies
sonic-clientrequiredLibrary itself; no external runtime dependencies documented.
Agent activity
52 hits · last 30 days
node
48
Amazon
1
Resources
sonic-client — pip install sonic-client · libregistry