Playground & Sandbox
++ Explore Senzing from the convenience of your workstation. +
++ Depending on your goal, you may want to use the Playground + or you may want to use the Sandbox. + The Playground has "baked-in" features that + allow you to examine Senzing without installing anything + on your workstation. + The Sandbox helps you set up an environment on your + workstation to use Senzing via a gRPC server. +
++ So the question is: What is your goal? +
++ + Choose your goal: +
+ + ++ +
++ +
++ +
++ +
+Senzing Playground for Go
-Go is not ready yet.
+Senzing Playground for Java
+Java is not ready yet.
Senzing Playground
-- The Senzing Playground is a place to explore Senzing from the convenience of your workstation. - It has support for the Python, Java, Go, and C-sharp programming languages. - It also has support for the Senzing tools. -
-- Choose a topic from the left-hand navigation bar and get started. -
- - - -- -
-The left-hand navigation bar has the following topics:
- --
-
-
-
- Language
-
Support for software development languages.
-
- -
-
- Python
-
- Python shows how to explore the Senzing Playground - using Jupyter Notebooks and Python programs using - Senzing Python Software Development Kit (SDK). -
-
- -
-
-
- Java
-
Not implemented.
-
- -
-
- Go
-
Not implemented.
-
- -
-
-
- C#
-
Not implemented.
-
-
-
-
-
-
-
-
- Tools
-
Not implemented.
-
-
Senzing Playground for Python
You can use Jupyter notebooks or the Python SDK to explore Senzing. Senzing SDK methods are documented in
the Start a gRPC server
- In the future, if you only need a gRPC server, but not the entire Senzing
- Playground, run:
-
-
- docker run -it --name senzing-serve-grpc -p 8261:8261 --pull always --rm senzing/serve-grpc
-
Download and run example Python programs
- Prepare your python environment by installing the Python
- senzing-grpc
- package into your environment.
-
Example:
-
- python3 -m pip install --upgrade senzing-grpc
-
- Download and run any of the following files:
-
@@ -237,15 +228,7 @@
Start a gRPC server
- In the future, if you only need a gRPC server, but not the entire Senzing - Playground, run: -
-
- docker run -it --name senzing-serve-grpc -p 8261:8261 --pull always --rm senzing/serve-grpc
-
- Python
+The Senzing SDK for Python methods are documented in + the Senzing Software Development Kit + (SDK). +
++ The next step depends on your goal. +
++ + Choose your goal: +
+ + + +Using my Jupyter Lab
++ Download and run the following Jupyter notebooks in your Jupyter Lab: +
-
+
- senzing_hello_world.ipynb + - A simple test of connectivity to Senzing engine. +
- senzing_load_truthsets.ipynb + - Load and query the Senzing truth-set-data. +
- senzing_load_user_data.ipynb + - Load custom data. + +
Senzing SDK in my development environment
++ Download and run any of the following files: +
-
+
- senzing_hello_world.py + - A simple test of connectivity to Senzing engine. +
- senzing_load_truthsets.py + - Load and query the Senzing truth-set-data. +
- senzing_load_user_data.py + - Load custom data. +
- senzing_method_help.py + - Show how to display help. + +
+ Using the files as examples, build your own Python application using the Senzing SDK. +
+ +Migrate from gRPC to native SDK
++ To migrate your Python application from using the Senzing SDK for Python over gRPC to using the + Senzing SDK for Python, replace the following code: +
+
+from senzing_grpc import SzAbstractFactory, SzAbstractFactoryParameters
+
+FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
+ "grpc_channel": grpc.insecure_channel("localhost:8261"),
+}
+
+
+from senzing import SzAbstractFactory, SzAbstractFactoryParameters
+
+FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
+ "instance_name": "Example",
+ "settings": {
+ "PIPELINE": {
+ "CONFIGPATH": "/etc/opt/senzing",
+ "RESOURCEPATH": "/opt/senzing/er/resources",
+ "SUPPORTPATH": "/opt/senzing/data",
+ },
+ "SQL": {"CONNECTION": "sqlite3://na:na@/tmp/sqlite/G2C.db"},
+ },
+}
+
+ Senzing SDK without installing anything
++ You can use Jupyter notebooks or the Python SDK to explore Senzing. +
++ Hint: If the senzing/playground docker container has been use in a prior + demonstration, restart the docker container for best results. +
+ +Jupyter notebook demonstration
++ In this demonstration, Jupyter notebooks have been created to demonstrate Senzing. + Using these notebooks as a starting point, modify the notebook to explore Senzing. +
++ + Choose a Jupyter notebook: +
++
-
+
- Senzing + Hello World - A simple test of connectivity to Senzing engine. +
- Load + Senzing truth-sets - Load and query the Senzing truth-set-data. +
- Load + user data - Load custom data. + +
+ Use a notebook as starting point to create your own Jupyter notebooks. Remember that the + notebooks are not permanent and will be deleted when the docker container is destroyed. You can + save a notebook locally by saving the notebook in Jupyter Lab, then selecting File > + Download. +
+
+ You can also upload a Python Notebook (.ipynb) file using a docker command.
+
Example:
+
+ docker container cp /tmp/my_local.ipynb senzing-playground:/examples/notebooks/python/my_local.ipynb
+
+ Senzing Python SDK demonstration
++ To run the example files, open Xterm and + run any of the following: +
+ senzing_hello_world.py
+ senzing_load_truthsets.py
+ senzing_load_user_data.py
+
+
+ By using a docker command, you can upload and download files to/from the running Docker
+ container.
Example download from Docker container:
+
+ docker container cp senzing-playground:/examples/python/senzing_hello_world.py /tmp/senzing_hello_world.py
+
+
+ docker container cp /tmp/my_local.py senzing-playground:/examples/python/my_local.py
+
+