Skip to main content

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.

Python 3.11 Badge PEP8 Badge PyPI version Badge Downloads Badge [![License Badge]][License] Coverage Badge

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:

  1. SzConfigAbstract
  2. SzConfigMgrAbstract
  3. SzDiagnosticAbstract
  4. SzEngineAbstract
  5. SzProductAbstract

Other implementations of the sz-sdk-python-abstract interface include:

Use

The following example shows how to start a Senzing gRPC server Docker container and access it using the senzing_grpc Python package.

  1. Install the senzing-grpc Python package. Example:

    python3 -m pip install --upgrade senzing-grpc
    
  2. 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.

  3. In a separate window, start an interactive Python session. Example:

    python3
    
  4. 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

  1. Development
  2. Errors
  3. Examples
  4. Related artifacts:
    1. DockerHub
  5. sz-sdk-python-abstract package reference

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

senzing_grpc-0.3.4.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

senzing_grpc-0.3.4-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file senzing_grpc-0.3.4.tar.gz.

File metadata

  • Download URL: senzing_grpc-0.3.4.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for senzing_grpc-0.3.4.tar.gz
Algorithm Hash digest
SHA256 c3fd5aabebc3aaa86eb0997cd19ae3f9c456d3ba3b636b7b2052253796929cc7
MD5 9f50e81fdad0b97baec01d4588385294
BLAKE2b-256 784e5a541600743f97145935bad64b1a9078c15585455941fd0209c2f05c164a

See more details on using hashes here.

Provenance

The following attestation bundles were made for senzing_grpc-0.3.4.tar.gz:

Publisher: publish-to-pypi.yaml on senzing-garage/sz-sdk-python-grpc

Attestations:

File details

Details for the file senzing_grpc-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: senzing_grpc-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 37.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for senzing_grpc-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 116af6961a50751e1531f604ceec0d3a18d30a72da1a3daf522296e7907b3e74
MD5 9f4aca7b620009347c8187263b5e6f01
BLAKE2b-256 6858f9d1e2ddaa0273e9e70ca043585694990a38f54424fa4883e79948e9a66c

See more details on using hashes here.

Provenance

The following attestation bundles were made for senzing_grpc-0.3.4-py3-none-any.whl:

Publisher: publish-to-pypi.yaml on senzing-garage/sz-sdk-python-grpc

Attestations:

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