Python SDK for Senzing API over gRPC
Project description
sz-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: sz-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 sz-sdk-python-grpc
package provides a Python Software Development Kit
adhering to the abstract classes of sz-sdk-python-abstract
that communicates with a Senzing gRPC server.
Overview
The Senzing sz-sdk-python-grpc
packages enable Python programs to call Senzing library functions
across a network to a Senzing gRPC server.
The sz-sdk-python-grpc
package implements the following sz-sdk-python-abstract interfaces:
Other implementations of the sz-sdk-python-abstract interface include:
- sz-sdk-python - 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. 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@nowhere/tmp/sqlite/G2C.db \ --env SENZING_TOOLS_ENABLE_ALL=true \ --name senzing-tools-serve-grpc \ --publish 8261:8261 \ --pull always \ --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 SzAbstractFactory sz_abstract_factory = SzAbstractFactory(grpc_channel=grpc.insecure_channel("localhost:8261")) sz_product = sz_abstract_factory.create_sz_product() print(sz_product.get_version())
More can be seen in Examples.
References
- Development
- Errors
- Examples
- Related artifacts:
- sz-sdk-python-abstract package reference
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.2.0.tar.gz
.
File metadata
- Download URL: senzing_grpc-0.2.0.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c8b45b30a9ca03af574bfda181dc0333d981941a109a954f047cddaadd6cd1a |
|
MD5 | 0e38904e67fdac461f8e65e75d3a0e86 |
|
BLAKE2b-256 | db49401165f1e629ad193f9d4283a535b255874f6796c89d7c76dd7f16d4f6a2 |
File details
Details for the file senzing_grpc-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: senzing_grpc-0.2.0-py3-none-any.whl
- Upload date:
- Size: 35.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2007ed4e2972cbdc4f0a56db15d67611e908b8a77f761c1984e72e3baa5b07bf |
|
MD5 | 9a44ce6b54ed097d5bcb709a9d92ff81 |
|
BLAKE2b-256 | f5a9ef7fdd74a1613c23f6d85df2eb87cc53aca2f26f0e4534ba49ccafad4ac5 |