Python SDK for Senzing API over gRPC
Project description
g2-sdk-python-grpc
:warning: WARNING: g2-sdk-python-grpc is still in development :warning: _
At the moment, this is "work-in-progress" with Semantic Versions of 0.n.x
.
Although it can be reviewed and commented on,
the recommendation is not to use it yet.
Synopsis
The Senzing g2-sdk-python-grpc
package provides a Python Software Development Kit
adhering to the abstract classes of
g2-sdk-python-next
that communicates with a
Senzing gRPC server.
Overview
The Senzing g2-sdk-python-grpc
packages enable Python programs to call Senzing library functions
across a network to a
Senzing gRPC server.
The g2-sdk-python-grpc
package implement thes following
g2-sdk-python
interfaces:
Other implementations of the g2-sdk-python interface include:
- g2-sdk-python-next - for calling Senzing SDK APIs natively
Use
The following example shows how to start a Senzing gRPC server Docker container
and access it using the senzing_grpc
python package.
-
In a separate window, run a Senzing gRPC service using Docker.
Note: In this example,
SENZING_TOOLS_DATABASE_URL
specifies a file inside the container. Thus it is temporal and will be deleted when the container is killed. Example:docker run \ --env SENZING_TOOLS_COMMAND=serve-grpc \ --env SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@/tmp/sqlite/G2C.db \ --env SENZING_TOOLS_ENABLE_ALL=true \ --name senzing-tools-serve-grpc \ --publish 8261:8261 \ --rm \ senzing/senzing-tools
-
Install the
senzing-grpc
python package. Example:python3 -m pip install senzing-grpc
-
Start an interactive python session. Example:
python3
-
Paste the following into the interactive Python session. Example:
import grpc from senzing_grpc import g2product_grpc g2_product = g2product_grpc.G2ProductGrpc(grpc_channel=grpc.insecure_channel("localhost:8261")) print(g2_product.version())
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file senzing_grpc-0.0.1.tar.gz
.
File metadata
- Download URL: senzing_grpc-0.0.1.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 203558110d1e4c8d4c596d0f715f7836aed19c57dcb5477938bddedcde3b5024 |
|
MD5 | bfe694b787f7a6c4967e87615099b20a |
|
BLAKE2b-256 | 2a4e43691d2b2a1e21f2f44dd8c9b6bc2e7624853618ab7793974c00b4fadcb8 |
File details
Details for the file senzing_grpc-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: senzing_grpc-0.0.1-py3-none-any.whl
- Upload date:
- Size: 42.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40822eb232fbf1a35771d307ef28c93e4581aff7e3068d38652434913e981136 |
|
MD5 | 60872f43bd2a2bad60b27295722aa713 |
|
BLAKE2b-256 | 62fbb0d8180d987e790efc7e63822dbcb55f97543fcd9a18aa7a8b09457c5c99 |