senzing Python package documentation
The senzing Python package contains the interface definitions for the senzing-core and senzing-grpc implementation packages.
By using interface definitions, implementation-agnostic code can be written. For example, the following code does not need to know the underlying implementation of the Senzing Abstract Factory:
1from senzing import SzAbstractFactory, SzEngineFlags
2
3
4def perform_senzing_search(sz_abstract_factory: SzAbstractFactory, attributes: str) -> str:
5 """Example Senzing search."""
6 sz_engine = sz_abstract_factory.create_engine()
7 flags = SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS
8 search_profile = ""
9 return sz_engine.search_by_attributes(attributes, flags, search_profile)
Similarly, interface definitions for Senzing objects can be used. Example:
1from senzing import SzEngine, SzEngineFlags
2
3
4def perform_senzing_search(sz_engine: SzEngine, attributes: str) -> str:
5 """Example Senzing search."""
6 flags = SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS
7 search_profile = ""
8 return sz_engine.search_by_attributes(attributes, flags, search_profile)
Senzing has additional Software Development Kits (SDKs) for Java, Go, and C#. Information for these SDKs can be found at docs.senzing.com.