Skip to main content

Python client for sonic search backend

Reason this release was yanked:

Failed

Project description

Sonic Channel

Python client for sonic search backend.

We recommend you start with the documentation.

Installation

pip install pysonic-channel

Example usage

Search channel

Note: This example requires enabling the search feature, enabled by default.

from sonic import IngestChannel, SearchChannel, ControlChannel

querycl = SearchChannel("localhost:1491", "SecretPassword")
print(querycl.ping())
print(querycl.query("wiki", "articles", "for"))
print(querycl.query("wiki", "articles", "love"))
print(querycl.suggest("wiki", "articles", "hell"))

Ingest channel

Note: This example requires enabling the ingest feature.

from sonic import IngestChannel, SearchChannel, ControlChannel

ingestcl = IngestChannel("localhost:1491", "SecretPassword")
print(ingestcl.ping())
ingestcl.push("wiki", "articles", "article-1", "for the love of god hell")
ingestcl.push("wiki", "articles", "article-2", "for the love of satan heaven")
ingestcl.push("wiki", "articles", "article-3", "for the love of lorde hello")
ingestcl.push("wiki", "articles", "article-4", "for the god of loaf helmet")

Control channel

Note: This example requires enabling the control feature.

from sonic import IngestChannel, SearchChannel, ControlChannel

controlcl = ControlChannel("localhost:1491", "SecretPassword")
print(controlcl.ping())
print(controlcl.consolidate())

Available features

  • default - ["search", "ingest", "control"]
  • search - Add sonic search mode with methods
  • ingest - Add sonic ignite mode with methods
  • control - Add sonic control mode with methods

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysonic_channel-0.1.2.tar.gz (11.1 kB view hashes)

Uploaded Source

Built Distributions

pysonic_channel-0.1.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pysonic_channel-0.1.2-pp39-pypy39_pp73-macosx_10_7_x86_64.whl (396.9 kB view hashes)

Uploaded PyPy macOS 10.7+ x86-64

pysonic_channel-0.1.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pysonic_channel-0.1.2-pp38-pypy38_pp73-macosx_10_7_x86_64.whl (397.1 kB view hashes)

Uploaded PyPy macOS 10.7+ x86-64

pysonic_channel-0.1.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pysonic_channel-0.1.2-pp37-pypy37_pp73-macosx_10_7_x86_64.whl (399.6 kB view hashes)

Uploaded PyPy macOS 10.7+ x86-64

pysonic_channel-0.1.2-cp37-abi3-win_amd64.whl (256.5 kB view hashes)

Uploaded CPython 3.7+ Windows x86-64

pysonic_channel-0.1.2-cp37-abi3-win32.whl (247.1 kB view hashes)

Uploaded CPython 3.7+ Windows x86

pysonic_channel-0.1.2-cp37-abi3-musllinux_1_2_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ x86-64

pysonic_channel-0.1.2-cp37-abi3-musllinux_1_2_i686.whl (1.4 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

pysonic_channel-0.1.2-cp37-abi3-musllinux_1_2_armv7l.whl (1.5 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARMv7l

pysonic_channel-0.1.2-cp37-abi3-musllinux_1_2_aarch64.whl (1.4 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARM64

pysonic_channel-0.1.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

pysonic_channel-0.1.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.4 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

pysonic_channel-0.1.2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.4 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

pysonic_channel-0.1.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (1.4 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

pysonic_channel-0.1.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

pysonic_channel-0.1.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

pysonic_channel-0.1.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

pysonic_channel-0.1.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (777.7 kB view hashes)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

pysonic_channel-0.1.2-cp37-abi3-macosx_10_7_x86_64.whl (397.4 kB view hashes)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

Supported by

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