Python SDK for Senzing API over gRPC
Project description
g2-sdk-python-grpc
If you are beginning your journey with Senzing, please start with Senzing Quick Start guides.
You are in the Senzing Garage where projects are "tinkered" on. Although this GitHub repository may help you understand an approach to using Senzing, it's not considered to be "production ready" and is not considered to be part of the Senzing product. Heck, it may not even be appropriate for your application of Senzing!
: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-abstract
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 implements the following
g2-sdk-python-abstract
interfaces:
Other implementations of the g2-sdk-python-abstract 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.
-
Install the
senzing-grpc
Python package. If thesenzing-grpc
Python package is already installed, this step is not necessary. Example:python3 -m pip install --upgrade senzing-grpc
-
Run a Senzing gRPC service using Docker. 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
Note: In this example,
SENZING_TOOLS_DATABASE_URL
specifies a file inside the container. Thus the database is temporal and will be deleted when the container is killed. -
In a separate window, start an interactive Python session. Example:
python3
-
Paste the following into the interactive Python session. Example:
import grpc from senzing_grpc import G2ProductGrpc g2_product = G2ProductGrpc(grpc_channel=grpc.insecure_channel("localhost:8261")) print(g2_product.version())
More can be seen in Examples.
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.1.0.tar.gz
.
File metadata
- Download URL: senzing_grpc-0.1.0.tar.gz
- Upload date:
- Size: 32.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f88584094457f4a13de82a0eba463ad95094ebf36a864a32179c153ef155b38a |
|
MD5 | 1dbd67dd9a4d89fece5b426ed1ac869a |
|
BLAKE2b-256 | 95d584d8d25bb9ad0f0d770cd4f75ec791d7548c6f264cd0aed863423c31fa4e |
File details
Details for the file senzing_grpc-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: senzing_grpc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 42.6 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 | 0ab15a6fe5576a7c6872866621be6f06dfccb8f004a789bb20f81e342f847dce |
|
MD5 | 5946ff683fa20a04e64afc31518c7a1f |
|
BLAKE2b-256 | 86e1044cce63b1310184ca3d69fa659d4831a795d10b4c20226f3ef9ec97df0a |